Commit b8d0fcbc authored by Jeroen Demeyer's avatar Jeroen Demeyer

Pass first arg of visitproc as PyObject*

parent 56a44bf2
...@@ -1495,10 +1495,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -1495,10 +1495,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
for entry in py_attrs: for entry in py_attrs:
var_code = "p->%s" % entry.cname var_code = "p->%s" % entry.cname
var_as_pyobject = PyrexTypes.typecast(py_object_type, entry.type, var_code)
code.putln("if (%s) {" % var_code) code.putln("if (%s) {" % var_code)
if entry.type.is_extension_type: code.putln("e = (*v)(%s, a); if (e) return e;" % var_as_pyobject)
var_code = "((PyObject*)%s)" % var_code
code.putln("e = (*v)(%s, a); if (e) return e;" % var_code)
code.putln("}") code.putln("}")
# Traverse buffer exporting objects. # Traverse buffer exporting objects.
......
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