From: Stefan Behnel Date: Thu, 17 Jan 2008 22:09:13 +0000 (+0100) Subject: revert C++ assignment fix as it breaks gcc X-Git-Tag: 0.9.6.14~29^2~62^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3cd87370a84aca6197c52a56eeccf8dfd1cf9d44;p=cython.git revert C++ assignment fix as it breaks gcc --- diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 207b0215..55bbbda6 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -797,10 +797,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.putln("}") for entry in py_attrs: name = "p->%s" % entry.cname - if entry.type.is_extension_type: - name = "((PyObject*)%s)" % name - code.putln("tmp = %s;" % name) - code.put_init_to_py_none(name, PyrexTypes.py_object_type) + code.putln("tmp = ((PyObject*)%s);" % name) + code.put_init_to_py_none(name, entry.type) code.putln("Py_XDECREF(tmp);") code.putln( "return 0;")