do not use refnanny in module cleanup code
authorStefan Behnel <scoder@users.berlios.de>
Tue, 24 Feb 2009 13:32:57 +0000 (14:32 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Tue, 24 Feb 2009 13:32:57 +0000 (14:32 +0100)
Cython/Compiler/ModuleNode.py

index 4f98c252b52b675cbce74e27697063143128e8ed..0e0bdf7e3540533a62ca24abcdf44740e772369e 100644 (file)
@@ -1707,7 +1707,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
                                       nanny=False)
         for entry in env.default_entries:
             if entry.type.is_pyobject and entry.used:
-                code.put_var_decref_clear(entry)
+                code.putln("Py_DECREF(%s); %s = 0;" % (
+                    code.entry_as_pyobject(entry), entry.cname))
         code.putln("Py_INCREF(Py_None); return Py_None;")
         code.putln('}')