From: Stefan Behnel Date: Sun, 26 Oct 2008 15:43:46 +0000 (+0100) Subject: generate cleanup code for set utility code X-Git-Tag: 0.9.9.2.beta~16 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=a283bce5fd5e2e38877d3a7ae45005782d8d5c40;p=cython.git generate cleanup code for set utility code --- diff --git a/Cython/Compiler/Builtin.py b/Cython/Compiler/Builtin.py index 391003f5..c87905cc 100644 --- a/Cython/Compiler/Builtin.py +++ b/Cython/Compiler/Builtin.py @@ -264,7 +264,13 @@ static int __Pyx_Py23SetsImport(void) { return 0; } #endif /* < Py2.4 */ #endif /* < Py2.5 */ """, -init = put_py23_set_init_utility_code) +init = put_py23_set_init_utility_code, +cleanup = """ +#if PY_VERSION_HEX < 0x02040000 +Py_XDECREF(__Pyx_PySet_Type); +Py_XDECREF(__Pyx_PyFrozenSet_Type); +#endif /* < Py2.4 */ +""") builtin_utility_code = { 'getattr3' : getattr3_utility_code,