Commit 3a9b5215 authored by Robert Bradshaw's avatar Robert Bradshaw

C++ assignment fix

parent 1ae77b00
...@@ -799,8 +799,10 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -799,8 +799,10 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.putln("}") code.putln("}")
for entry in py_attrs: for entry in py_attrs:
name = "p->%s" % entry.cname name = "p->%s" % entry.cname
if entry.type.is_extension_type:
name = "((PyObject*)%s)" % name
code.putln("tmp = %s;" % name) code.putln("tmp = %s;" % name)
code.put_init_to_py_none(name, entry.type) code.put_init_to_py_none(name, PyrexTypes.py_object_type)
code.putln("Py_XDECREF(tmp);") code.putln("Py_XDECREF(tmp);")
code.putln( code.putln(
"return 0;") "return 0;")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment