From 4b6142dcdf7b2733a052a28c3f45c8fbca65e721 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Mon, 23 Feb 2009 22:04:18 +0100 Subject: [PATCH] actually, don't call generate_post_assignment_code, as we already used generate_evaluation_code --- Cython/Compiler/Nodes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.26.2