Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
087d29ca
Commit
087d29ca
authored
Mar 25, 2009
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix py target for-from loop.
parent
4f86ca24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+9
-1
No files found.
Cython/Compiler/Nodes.py
View file @
087d29ca
...
...
@@ -3949,8 +3949,16 @@ class ForFromStatNode(LoopNode, StatNode):
if
self
.
py_loopvar_node
:
# Reassign py variable to loop var here.
# (For consistancy, should rarely come up in practice.)
pass
import
ExprNodes
from_py_node
=
ExprNodes
.
CoerceFromPyTypeNode
(
self
.
loopvar_node
.
type
,
self
.
target
,
None
)
from_py_node
.
temp_code
=
loopvar_name
from_py_node
.
generate_result_code
(
code
)
code
.
putln
(
"}"
)
if
self
.
py_loopvar_node
:
# This is potentially wasteful, but we don't want the semantics to
# depend on whether or not the loop is a python type.
self
.
py_loopvar_node
.
generate_evaluation_code
(
code
)
self
.
target
.
generate_assignment_code
(
self
.
py_loopvar_node
,
code
)
break_label
=
code
.
break_label
code
.
set_loop_labels
(
old_loop_labels
)
if
self
.
else_clause
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment