Commit af51810b authored by Stefan Behnel's avatar Stefan Behnel

preparing a function default argument needs a GIVEREF

parent 95faf8af
...@@ -1240,6 +1240,7 @@ class FuncDefNode(StatNode, BlockNode): ...@@ -1240,6 +1240,7 @@ class FuncDefNode(StatNode, BlockNode):
code.putln( code.putln(
"%s = 0;" % "%s = 0;" %
default.result()) default.result())
code.put_giveref(arg.default_entry.cname)
default.free_temps(code) default.free_temps(code)
# For Python class methods, create and store function object # For Python class methods, create and store function object
if self.assmt: if self.assmt:
......
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