Commit 4b6142dc authored by Stefan Behnel's avatar Stefan Behnel

actually, don't call generate_post_assignment_code, as we already used generate_evaluation_code

parent 97034caf
......@@ -1238,7 +1238,8 @@ class FuncDefNode(StatNode, BlockNode):
"%s = %s;" % (
arg.default_entry.cname,
default.result_as(arg.default_entry.type)))
default.generate_post_assignment_code(code)
if default.is_temp and default.type.is_pyobject:
code.putln("%s = 0;" % default.result())
default.free_temps(code)
code.put_giveref(arg.default_entry.cname)
# For Python class methods, create and store function object
......
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