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)
+ code.put_var_giveref(arg.default_entry)
# For Python class methods, create and store function object
if self.assmt:
self.assmt.generate_execution_code(code)
<argdefault.Bla object at ...>
>>> g5() #doctest: +ELLIPSIS
<argdefault.Bla object at ...>
+
+>>> f6()
+7
+>>> g6()
+7
"""
GLB0 = (1, 2)
return arg
def g5(Bla arg=Bla()):
return arg
+
+
+cdef int GLB6 = 7
+def f6(int arg=GLB6):
+ return arg
+def g6(int arg=7):
+ return arg