actually, don't call generate_post_assignment_code, as we already used generate_evalu...
authorStefan Behnel <scoder@users.berlios.de>
Mon, 23 Feb 2009 21:04:18 +0000 (22:04 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Mon, 23 Feb 2009 21:04:18 +0000 (22:04 +0100)
Cython/Compiler/Nodes.py

index 808636103e57ff77d7ca69f6320fa25e7f17c539..d3558dbf7ccd5c3170f41e7e0fe40d3a076aef23 100644 (file)
@@ -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