From 16b6170cdbb70641a6d3c5fc7f6ff451f05efdc7 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 28 Jan 2011 18:47:29 +0100 Subject: [PATCH 1/1] indexing a C ptr/array is 'simple' --- Cython/Compiler/ExprNodes.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 254554b8..5c4c0579 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -2014,6 +2014,11 @@ class IndexNode(ExprNode): def is_ephemeral(self): return self.base.is_ephemeral() + def is_simple(self): + base = self.base + return (base.is_simple() and self.index.is_simple() + and base.type and (base.type.is_ptr or base.type.is_array)) + def analyse_target_declaration(self, env): pass -- 2.26.2