From aa0ec1fcb1bafe98c56c25685a155134c96673a8 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 13 Jan 2008 10:11:07 +0100 Subject: [PATCH] reset to None instead of NULL in tp_clear() --- 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 5b918dab..fe9a1d0a 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -767,7 +767,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.putln("}") for entry in py_attrs: name = "p->%s" % entry.cname - code.putln("tmp = %s; %s = 0;" % (name, name)) + code.putln("tmp = %s;" % name) + code.put_init_to_py_none(name, entry.type) code.putln("Py_XDECREF(tmp);") code.putln( "return 0;") -- 2.26.2