From: Stefan Behnel Date: Fri, 28 Jan 2011 17:47:29 +0000 (+0100) Subject: indexing a C ptr/array is 'simple' X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=16b6170cdbb70641a6d3c5fc7f6ff451f05efdc7;p=cython.git indexing a C ptr/array is 'simple' --- 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