From: Lisandro Dalcin Date: Mon, 23 Feb 2009 21:01:10 +0000 (-0200) Subject: do not nullify imported extension types at module cleanup X-Git-Tag: 0.11.rc~42^2~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4416dc66069ae6d417806d1fd6ad9868cf688af7;p=cython.git do not nullify imported extension types at module cleanup --- diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 3967f8dd..b63b3699 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -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: