projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3028eb
)
indexing a C ptr/array is 'simple'
author
Stefan Behnel
<scoder@users.berlios.de>
Fri, 28 Jan 2011 17:47:29 +0000
(18:47 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Fri, 28 Jan 2011 17:47:29 +0000
(18:47 +0100)
Cython/Compiler/ExprNodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ExprNodes.py
b/Cython/Compiler/ExprNodes.py
index 254554b80c884f7fb82a8d2b0a4759c6365729d8..5c4c0579283adc8e3229f0aa5ab99981ce88e06e 100755
(executable)
--- 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