more fixme's
authorStefan Behnel <scoder@users.berlios.de>
Thu, 13 Nov 2008 22:37:19 +0000 (23:37 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Thu, 13 Nov 2008 22:37:19 +0000 (23:37 +0100)
Cython/Compiler/ExprNodes.py

index 44c7120f12154fc5d3e5568b42cee54e40ff6994..74276592f9e536b92ec84ff81f98c88a2eae3bef 100644 (file)
@@ -1820,11 +1820,6 @@ class SliceIndexNode(ExprNode):
                     self.stop_code(),
                     rhs.result()))
         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 = ''
             if self.start:
                 start_offset = self.start_code()
@@ -1832,6 +1827,12 @@ class SliceIndexNode(ExprNode):
                     start_offset = ''
                 else:
                     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):
                 code.putln("%s[%s%s] = %s[%d];" % (
                         self.base.result(), start_offset, i,