Commit c5ddac6e authored by Stefan Behnel's avatar Stefan Behnel

fix tuple unpacking bug

parent 057375c9
...@@ -2062,12 +2062,12 @@ class SequenceNode(ExprNode): ...@@ -2062,12 +2062,12 @@ class SequenceNode(ExprNode):
rhs.py_result(), rhs.py_result(),
rhs.py_result(), rhs.py_result(),
len(self.args))) len(self.args)))
code.putln("PyObject* tuple = %s;" % rhs.py_result())
for i in range(len(self.args)): for i in range(len(self.args)):
item = self.unpacked_items[i] item = self.unpacked_items[i]
code.putln( code.putln(
"%s = PyTuple_GET_ITEM(%s, %s);" % ( "%s = PyTuple_GET_ITEM(tuple, %s);" % (
item.result_code, item.result_code,
rhs.py_result(),
i)) i))
code.put_incref(item.result_code, item.ctype()) code.put_incref(item.result_code, item.ctype())
value_node = self.coerced_unpacked_items[i] value_node = self.coerced_unpacked_items[i]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment