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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
35a90d1c
Commit
35a90d1c
authored
Mar 28, 2009
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DictNode, newtemps and so on
parent
cfcf8605
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+3
-11
No files found.
Cython/Compiler/ExprNodes.py
View file @
35a90d1c
...
...
@@ -3424,7 +3424,7 @@ class SetNode(NewTempExprNode):
arg
.
free_temps
(
code
)
class
DictNode
(
ExprNode
):
class
DictNode
(
NewTemp
ExprNode
):
# Dictionary constructor.
#
# key_value_pairs [DictItemNode]
...
...
@@ -3492,19 +3492,11 @@ class DictNode(ExprNode):
gil_message
=
"Constructing Python dict"
def
allocate_temps
(
self
,
env
,
result
=
None
):
# Custom method used here because key-value
# pairs are evaluated and used one at a time.
self
.
allocate_temp
(
env
,
result
)
for
item
in
self
.
key_value_pairs
:
item
.
key
.
allocate_temps
(
env
)
item
.
value
.
allocate_temps
(
env
)
item
.
key
.
release_temp
(
env
)
item
.
value
.
release_temp
(
env
)
def
generate_evaluation_code
(
self
,
code
):
# Custom method used here because key-value
# pairs are evaluated and used one at a time.
code
.
mark_pos
(
self
.
pos
)
self
.
allocate_temp_result
(
code
)
if
self
.
type
.
is_pyobject
:
self
.
release_errors
()
code
.
putln
(
...
...
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