diff options
author | Robert Bradshaw <robertwb@gmail.com> | 2014-02-18 09:30:01 -0800 |
---|---|---|
committer | Robert Bradshaw <robertwb@gmail.com> | 2014-02-18 09:30:01 -0800 |
commit | d360c927d8c2c7027e54b5e600d337f936b3d155 (patch) | |
tree | a84820fbfbfa0a68fd8b37c4f3bcf1466cbf4438 /Cython/Utility/ModuleSetupCode.c | |
parent | 5fbe131da6d8b11c2d7a375e8a1b4660c9853c3f (diff) | |
download | cython-d360c927d8c2c7027e54b5e600d337f936b3d155.tar.gz |
Clang-compatible C++ nested destructor call.
Diffstat (limited to 'Cython/Utility/ModuleSetupCode.c')
-rw-r--r-- | Cython/Utility/ModuleSetupCode.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c index 6d9ac1a08..fc8a63ffa 100644 --- a/Cython/Utility/ModuleSetupCode.c +++ b/Cython/Utility/ModuleSetupCode.c @@ -336,6 +336,14 @@ static CYTHON_INLINE float __PYX_NAN() { } #endif +// Work around clang bug http://stackoverflow.com/questions/21847816/c-invoke-nested-template-class-destructor +#ifdef __cplusplus +template<typename T> +void __Pyx_call_destructor(T* x) { + x->~T(); +} +#endif + /////////////// UtilityFunctionPredeclarations.proto /////////////// /* unused attribute */ |