From: Stefan Behnel Date: Wed, 9 Jan 2008 22:26:01 +0000 (+0100) Subject: Backed out changeset 4a6021b8a18c X-Git-Tag: 0.9.6.14~29^2~62^2~17 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ef7778b64aa8a6d5f095db59785876c2907cbaf2;p=cython.git Backed out changeset 4a6021b8a18c there is a better way to do that --- diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 898a393a..05befd1b 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -723,11 +723,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): if py_attrs: self.generate_self_cast(scope, code) if base_type: - code.putln("if (PyType_IS_GC(%s)) {" % base_type.typeptr_cname) code.putln( "e = %s->tp_traverse(o, v, a); if (e) return e;" % base_type.typeptr_cname) - code.putln("}") for entry in py_attrs: var_code = "p->%s" % entry.cname code.putln( @@ -758,11 +756,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): if py_attrs: self.generate_self_cast(scope, code) if base_type: - code.putln("if (PyType_IS_GC(%s)) {" % base_type.typeptr_cname) code.putln( "%s->tp_clear(o);" % base_type.typeptr_cname) - code.putln("}") for entry in py_attrs: name = "p->%s" % entry.cname code.put_xdecref(name, entry.type)