From 4416dc66069ae6d417806d1fd6ad9868cf688af7 Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Mon, 23 Feb 2009 19:01:10 -0200 Subject: [PATCH] do not nullify imported extension types at module cleanup --- Cython/Compiler/ModuleNode.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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: -- 2.26.2