From a16c2a58f722b783d60f9a4c4aafdca185c4582c Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 24 Feb 2009 14:32:57 +0100 Subject: [PATCH] do not use refnanny in module cleanup code --- Cython/Compiler/ModuleNode.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 4f98c252..0e0bdf7e 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -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('}') -- 2.26.2