From: Stefan Behnel Date: Thu, 17 Jan 2008 21:55:27 +0000 (+0100) Subject: fix tuple unpacking bug X-Git-Tag: 0.9.6.14~29^2~62^2~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c5ddac6e97b2d7b86d66b4c2f3c85a2cfdf15a08;p=cython.git fix tuple unpacking bug --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index f571cc03..116c0a37 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -2062,12 +2062,12 @@ class SequenceNode(ExprNode): rhs.py_result(), rhs.py_result(), len(self.args))) + code.putln("PyObject* tuple = %s;" % rhs.py_result()) for i in range(len(self.args)): item = self.unpacked_items[i] code.putln( - "%s = PyTuple_GET_ITEM(%s, %s);" % ( + "%s = PyTuple_GET_ITEM(tuple, %s);" % ( item.result_code, - rhs.py_result(), i)) code.put_incref(item.result_code, item.ctype()) value_node = self.coerced_unpacked_items[i]