Commit 22cb8452 authored by gsamain's avatar gsamain Committed by Xavier Thompson

Make wrapper call __alloc__ when there is no __new__ (instead of directly constructing the object)

parent 8237c4f6
......@@ -1177,7 +1177,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
new_arg_string = ', '.join(new_arg_names)
code.putln("%s self =(%s) %s(%s);" % (self_type, self_type, new_entry.func_cname, new_arg_string))
else:
code.putln("%s self = new %s();" % (self_type, type_string))
code.putln("%s self = %s();" % (self_type, alloc_entry.func_cname))
if init_entry:
init_entry = PyrexTypes.best_match(wrapper_arg_types,
......
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