do not nullify imported extension types at module cleanup
authorLisandro Dalcin <dalcinl@gmail.com>
Mon, 23 Feb 2009 21:01:10 +0000 (19:01 -0200)
committerLisandro Dalcin <dalcinl@gmail.com>
Mon, 23 Feb 2009 21:01:10 +0000 (19:01 -0200)
Cython/Compiler/ModuleNode.py

index 3967f8dd9163025a53224e404509deffa927996c..b63b36997db8e20cd9cc2e212339b67d4d48bea7 100644 (file)
@@ -1685,8 +1685,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
         if Options.generate_cleanup_code >= 3:
             code.putln("/*--- Type import cleanup code ---*/")
             for type, _ in env.types_imported.items():
-                code.putln("Py_DECREF((PyObject *)%s); %s = 0;" % (
-                    type.typeptr_cname, type.typeptr_cname))
+                code.putln("Py_DECREF((PyObject *)%s);" % type.typeptr_cname)
         if Options.cache_builtins:
             code.putln("/*--- Builtin cleanup code ---*/")
             for entry in env.cached_builtins: