Fix #663 - type inference for sliced complex pointers.
authorRobert Bradshaw <robertwb@math.washington.edu>
Thu, 3 Mar 2011 03:35:00 +0000 (19:35 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Thu, 3 Mar 2011 03:35:00 +0000 (19:35 -0800)
Cython/Compiler/ExprNodes.py

index 2a94ad1f6f5edc0cd4c3288c0cc98655b74bf9cb..c965251024ea01428193ad5cc3c563a2a6ea793a 100755 (executable)
@@ -2494,6 +2494,8 @@ class SliceIndexNode(ExprNode):
         elif base_type in (bytes_type, str_type, unicode_type,
                            list_type, tuple_type):
             return base_type
+        elif base_type.is_ptr or base_type.is_array:
+            return PyrexTypes.c_array_type(base_type.base_type, None)
         return py_object_type
 
     def calculate_constant_result(self):