From a283bce5fd5e2e38877d3a7ae45005782d8d5c40 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 26 Oct 2008 16:43:46 +0100 Subject: [PATCH] generate cleanup code for set utility code --- Cython/Compiler/Builtin.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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, -- 2.26.2