From: Dag Sverre Seljebotn Date: Sun, 30 Nov 2008 12:45:16 +0000 (+0100) Subject: Fix for temp releasing in assignment to TupleNode X-Git-Tag: 0.11-beta~175 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3a6a907accf4bacc5ab7826bf66ddefb2245d89f;p=cython.git Fix for temp releasing in assignment to TupleNode --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 0a682b04..59b9d7ab 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -2850,7 +2850,7 @@ class SequenceNode(NewTempExprNode): code.put_incref(item.result(), item.ctype()) value_node = self.coerced_unpacked_items[i] value_node.generate_evaluation_code(code) - rhs.generate_disposal_code(code) + rhs.generate_disposal_code(code, free_temp=False) code.putln("} else {") @@ -2859,7 +2859,7 @@ class SequenceNode(NewTempExprNode): self.iterator.result(), rhs.py_result(), code.error_goto_if_null(self.iterator.result(), self.pos))) - rhs.generate_disposal_code(code) + rhs.generate_disposal_code(code, free_temp=False) for i in range(len(self.args)): item = self.unpacked_items[i] unpack_code = "__Pyx_UnpackItem(%s, %d)" % ( @@ -2880,6 +2880,7 @@ class SequenceNode(NewTempExprNode): self.iterator.generate_disposal_code(code) code.putln("}") + rhs.generate_disposal_code(code, free_temp=True, decref=False) for i in range(len(self.args)): self.args[i].generate_assignment_code( self.coerced_unpacked_items[i], code)