diff options
author | Robert Bradshaw <robertwb@gmail.com> | 2015-08-28 14:32:50 -0700 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2015-09-01 18:42:23 +0200 |
commit | 11a3e85c8131a1aef5341f72451e461e208a2be8 (patch) | |
tree | 5d234cef3bd04535a4b205401f6fce5dfd79380b /Cython/Utility/ModuleSetupCode.c | |
parent | 8b55232279eb6e51b1a9fe474f353c3fead85e1d (diff) | |
download | cython-11a3e85c8131a1aef5341f72451e461e208a2be8.tar.gz |
Use reference rather than pointer for destructor calling.
This avoids the issue with overloaded address-of operators.
Diffstat (limited to 'Cython/Utility/ModuleSetupCode.c')
-rw-r--r-- | Cython/Utility/ModuleSetupCode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c index 06c18f2da..ec3624a88 100644 --- a/Cython/Utility/ModuleSetupCode.c +++ b/Cython/Utility/ModuleSetupCode.c @@ -245,8 +245,8 @@ typedef struct { // Work around clang bug http://stackoverflow.com/questions/21847816/c-invoke-nested-template-class-destructor template<typename T> -void __Pyx_call_destructor(T* x) { - x->~T(); +void __Pyx_call_destructor(T& x) { + x.~T(); } // Used for temporary variables of "reference" type. |