fix disabling of cleanup code generation for tuple constants
authorStefan Behnel <scoder@users.berlios.de>
Wed, 17 Nov 2010 07:27:15 +0000 (08:27 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Wed, 17 Nov 2010 07:27:15 +0000 (08:27 +0100)
Cython/Compiler/Code.py

index 7592de39c9984096769fad067b74b30138628b71..e2954c299e1b4d362cdfee5abd7f88061677e2e7 100644 (file)
@@ -569,7 +569,7 @@ class GlobalState(object):
         # create a new Python object constant
         const = self.new_py_const(type, prefix)
         if cleanup_level is not None \
-               and cleanup_level >= Options.generate_cleanup_code:
+               and cleanup_level <= Options.generate_cleanup_code:
             cleanup_writer = self.parts['cleanup_globals']
             cleanup_writer.put_xdecref_clear(const.cname, type, nanny=False)
         return const