generate cleanup code for set utility code
authorStefan Behnel <scoder@users.berlios.de>
Sun, 26 Oct 2008 15:43:46 +0000 (16:43 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sun, 26 Oct 2008 15:43:46 +0000 (16:43 +0100)
Cython/Compiler/Builtin.py

index 391003f5985ce6214589a68b56b289e9ed363eec..c87905ccb161ec1f44ac689e8e7ee867693f3ca8 100644 (file)
@@ -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,