Allow ctypedef my_struct_s my_struct_t[1] trick, can access members of my_struct_t...
authorRobert Bradshaw <robertwb@math.washington.edu>
Thu, 3 Apr 2008 03:55:29 +0000 (20:55 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Thu, 3 Apr 2008 03:55:29 +0000 (20:55 -0700)
Cython/Compiler/ExprNodes.py

index e5273e3426230f9a099a540998a7a28fd7fdcb4c..ab3d891b4e35b627e3d169f2d1193a5c6471a4de 100644 (file)
@@ -1831,7 +1831,7 @@ class AttributeNode(ExprNode):
                 self.entry = entry.as_variable
                 self.analyse_as_python_attribute(env) 
                 return self
-        return AtomicExprNode.coerce_to(self, dst_type, env)
+        return ExprNode.coerce_to(self, dst_type, env)
     
     def compile_time_value(self, denv):
         attr = self.attribute
@@ -1948,7 +1948,7 @@ class AttributeNode(ExprNode):
         if self.obj.type.is_string:
             self.obj = self.obj.coerce_to_pyobject(env)
         obj_type = self.obj.type
-        if obj_type.is_ptr:
+        if obj_type.is_ptr or obj_type.is_array:
             obj_type = obj_type.base_type
             self.op = "->"
         elif obj_type.is_extension_type: