projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89af9c2
)
Fix slice iteration.
author
Robert Bradshaw
<robertwb@gmail.com>
Tue, 3 Jul 2012 09:26:05 +0000
(
02:26
-0700)
committer
Robert Bradshaw
<robertwb@gmail.com>
Tue, 3 Jul 2012 09:26:05 +0000
(
02:26
-0700)
Cython/Compiler/Nodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Nodes.py
b/Cython/Compiler/Nodes.py
index
2ee57e4
..
8e5c3c1
100644
(file)
--- a/
Cython/Compiler/Nodes.py
+++ b/
Cython/Compiler/Nodes.py
@@
-5381,6
+5381,10
@@
class ForInStatNode(LoopNode, StatNode):
def analyse_expressions(self, env):
self.target.analyse_target_types(env)
self.iterator.analyse_expressions(env)
+ if self.item is None:
+ # Hack. Sometimes analyse_declarations not called.
+ import ExprNodes
+ self.item = ExprNodes.NextNode(self.iterator)
self.item.analyse_expressions(env)
if (self.iterator.type.is_ptr or self.iterator.type.is_array) and \
self.target.type.assignable_from(self.iterator.type):