From ed76a7c3398de8d34fe9877206038eed40958e81 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw <robertwb@math.washington.edu> Date: Wed, 2 Apr 2008 20:55:29 -0700 Subject: [PATCH] Allow ctypedef my_struct_s my_struct_t[1] trick, can access members of my_struct_t as if it were a pointer. --- Cython/Compiler/ExprNodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index e5273e342..ab3d891b4 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -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: -- 2.30.9