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
ae79cef7
Commit
ae79cef7
authored
Nov 30, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
90dbf8a8
6ee53629
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
129 additions
and
55 deletions
+129
-55
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+109
-55
Cython/Compiler/Main.py
Cython/Compiler/Main.py
+10
-0
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-0
tests/run/ticket_124.pyx
tests/run/ticket_124.pyx
+8
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
ae79cef7
This diff is collapsed.
Click to expand it.
Cython/Compiler/Main.py
View file @
ae79cef7
...
...
@@ -87,6 +87,15 @@ class Context:
from
Buffer
import
IntroduceBufferAuxiliaryVars
from
ModuleNode
import
check_c_declarations
# Temporary hack that can be used to ensure that all result_code's
# are generated at code generation time.
import
Visitor
class
ClearResultCodes
(
Visitor
.
CythonTransform
):
def
visit_ExprNode
(
self
,
node
):
self
.
visitchildren
(
node
)
node
.
result_code
=
"<cleared>"
return
node
if
pxd
:
_check_c_declarations
=
None
_specific_post_parse
=
PxdPostParse
(
self
)
...
...
@@ -118,6 +127,7 @@ class Context:
DictIterTransform
(),
SwitchTransform
(),
FinalOptimizePhase
(
self
),
# ClearResultCodes(self),
# SpecialFunctions(self),
# CreateClosureClasses(context),
]
...
...
Cython/Compiler/Nodes.py
View file @
ae79cef7
...
...
@@ -3737,6 +3737,7 @@ class ForInStatNode(LoopNode, StatNode):
def
generate_execution_code
(
self
,
code
):
old_loop_labels
=
code
.
new_loop_labels
()
self
.
iterator
.
allocate_counter_temp
(
code
)
self
.
iterator
.
generate_evaluation_code
(
code
)
code
.
putln
(
"for (;;) {"
)
...
...
@@ -3753,6 +3754,7 @@ class ForInStatNode(LoopNode, StatNode):
self
.
else_clause
.
generate_execution_code
(
code
)
code
.
putln
(
"}"
)
code
.
put_label
(
break_label
)
self
.
iterator
.
release_counter_temp
(
code
)
self
.
iterator
.
generate_disposal_code
(
code
)
def
annotate
(
self
,
code
):
...
...
tests/run/ticket_124.pyx
0 → 100644
View file @
ae79cef7
"""
>>> spam(dict(test=2))
False
"""
def
spam
(
dict
d
):
for
elm
in
d
:
return
False
return
True
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