Commit bb97723f authored by Stefan Behnel's avatar Stefan Behnel

minor C code beautification

parent 3279d914
...@@ -4440,9 +4440,9 @@ class SequenceNode(ExprNode): ...@@ -4440,9 +4440,9 @@ class SequenceNode(ExprNode):
counter = '__pyx_n' counter = '__pyx_n'
code.putln('{ Py_ssize_t %s;' % counter) code.putln('{ Py_ssize_t %s;' % counter)
if arg_count == 1: if arg_count == 1:
offset = counter + ' + ' offset = counter
else: else:
offset = '%s * %s + ' % (counter, arg_count) offset = '%s * %s' % (counter, arg_count)
code.putln('for (%s=0; %s < %s; %s++) {' % ( code.putln('for (%s=0; %s < %s; %s++) {' % (
counter, counter, mult, counter counter, counter, mult, counter
)) ))
...@@ -4452,11 +4452,10 @@ class SequenceNode(ExprNode): ...@@ -4452,11 +4452,10 @@ class SequenceNode(ExprNode):
arg = self.args[i] arg = self.args[i]
if mult or not arg.result_in_temp(): if mult or not arg.result_in_temp():
code.put_incref(arg.result(), arg.ctype()) code.put_incref(arg.result(), arg.ctype())
code.putln("%s(%s, %s%s, %s);" % ( code.putln("%s(%s, %s, %s);" % (
set_item_func, set_item_func,
self.result(), self.result(),
offset, (offset and i) and ('%s + %s' % (offset, i)) or (offset or i),
i,
arg.py_result())) arg.py_result()))
code.put_giveref(arg.py_result()) code.put_giveref(arg.py_result())
if mult: if mult:
......
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