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
84c7d1da
Commit
84c7d1da
authored
Apr 23, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sort variable entries in closure scope to get a predictable C code result
parent
6c2a2b3b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+4
-3
No files found.
Cython/Compiler/ParseTreeTransforms.py
View file @
84c7d1da
...
...
@@ -1228,17 +1228,18 @@ class CreateClosureClasses(CythonTransform):
cname
=
Naming
.
outer_scope_cname
,
type
=
node
.
entry
.
scope
.
scope_class
.
type
,
is_cdef
=
True
)
for
entry
in
func_scope
.
entries
.
values
():
entries
=
func_scope
.
entries
.
items
()
entries
.
sort
()
for
name
,
entry
in
entries
:
# This is wasteful--we should do this later when we know
# which vars are actually being used inside...
#
# Also, this happens before type inference and type
# analysis, so the entries created here may end up having
# incorrect or at least unspecified types.
cname
=
entry
.
cname
class_scope
.
declare_var
(
pos
=
entry
.
pos
,
name
=
entry
.
name
,
cname
=
cname
,
cname
=
entry
.
cname
,
type
=
entry
.
type
,
is_cdef
=
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