Commit 17b5c93e authored by Stefan Behnel's avatar Stefan Behnel

more fixme's

parent 0cda22c4
...@@ -1820,11 +1820,6 @@ class SliceIndexNode(ExprNode): ...@@ -1820,11 +1820,6 @@ class SliceIndexNode(ExprNode):
self.stop_code(), self.stop_code(),
rhs.result())) rhs.result()))
else: else:
if rhs.type.is_array:
# FIXME: we should check both array sizes here
array_length = rhs.type.size
else:
array_length = self.base.type.size
start_offset = '' start_offset = ''
if self.start: if self.start:
start_offset = self.start_code() start_offset = self.start_code()
...@@ -1832,6 +1827,12 @@ class SliceIndexNode(ExprNode): ...@@ -1832,6 +1827,12 @@ class SliceIndexNode(ExprNode):
start_offset = '' start_offset = ''
else: else:
start_offset += '+' start_offset += '+'
if rhs.type.is_array:
# FIXME: we should check both array sizes here
array_length = rhs.type.size
else:
# FIXME: fix the array size according to start/stop
array_length = self.base.type.size
for i in range(array_length): for i in range(array_length):
code.putln("%s[%s%s] = %s[%d];" % ( code.putln("%s[%s%s] = %s[%d];" % (
self.base.result(), start_offset, i, self.base.result(), start_offset, 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