From 3cd87370a84aca6197c52a56eeccf8dfd1cf9d44 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 17 Jan 2008 23:09:13 +0100 Subject: [PATCH] revert C++ assignment fix as it breaks gcc --- Cython/Compiler/ModuleNode.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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;") -- 2.26.2