From: Stefan Behnel Date: Wed, 29 Apr 2009 19:10:33 +0000 (+0200) Subject: cleanup X-Git-Tag: 0.13.beta0~2^2~151 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=30a0e7179b048fd98ef48300f1d1c960835f4dd6;p=cython.git cleanup --- 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)