Commit e5ac16ed authored by Stefan Behnel's avatar Stefan Behnel

fix non-CPython C compile problem (variable declaration after code)

parent 02358999
...@@ -5981,6 +5981,7 @@ class SequenceNode(ExprNode): ...@@ -5981,6 +5981,7 @@ class SequenceNode(ExprNode):
code.error_goto_if_null(item.result(), self.pos))) code.error_goto_if_null(item.result(), self.pos)))
code.put_gotref(item.result()) code.put_gotref(item.result())
else: else:
code.putln("{")
code.putln("Py_ssize_t i;") code.putln("Py_ssize_t i;")
code.putln("PyObject** temps[%s] = {%s};" % ( code.putln("PyObject** temps[%s] = {%s};" % (
len(self.unpacked_items), len(self.unpacked_items),
...@@ -5991,6 +5992,7 @@ class SequenceNode(ExprNode): ...@@ -5991,6 +5992,7 @@ class SequenceNode(ExprNode):
code.put_gotref('item') code.put_gotref('item')
code.putln("*(temps[i]) = item;") code.putln("*(temps[i]) = item;")
code.putln("}") code.putln("}")
code.putln("}")
code.putln("#endif") code.putln("#endif")
rhs.generate_disposal_code(code) rhs.generate_disposal_code(code)
......
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