From 30a0e7179b048fd98ef48300f1d1c960835f4dd6 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Wed, 29 Apr 2009 21:10:33 +0200 Subject: [PATCH] cleanup --- Cython/Compiler/ExprNodes.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index dc405545..1ea30e08 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -1203,11 +1203,9 @@ class NameNode(AtomicExprNode): code.put_xdecref(self.result(), self.ctype()) else: code.put_decref(self.result(), self.ctype()) - if entry.is_cglobal: + if entry.is_cglobal or entry.in_closure: code.put_giveref(rhs.py_result()) code.putln('%s = %s;' % (self.result(), rhs.result_as(self.ctype()))) - if self.type.is_pyobject and self.entry.in_closure: - code.put_giveref(self.result()) if debug_disposal_code: print("NameNode.generate_assignment_code:") print("...generating post-assignment code for %s" % rhs) -- 2.26.2