From: Stefan Behnel Date: Mon, 23 Feb 2009 21:04:18 +0000 (+0100) Subject: actually, don't call generate_post_assignment_code, as we already used generate_evalu... X-Git-Tag: 0.11.rc~44 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4b6142dcdf7b2733a052a28c3f45c8fbca65e721;p=cython.git actually, don't call generate_post_assignment_code, as we already used generate_evaluation_code --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 80863610..d3558dbf 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -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