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
1c157dc1
Commit
1c157dc1
authored
Jan 27, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tweak: closure variables are not safe as function arguments; the last argument is safe, too
parent
6f8179ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+4
-4
No files found.
Cython/Compiler/ExprNodes.py
View file @
1c157dc1
...
...
@@ -2977,12 +2977,12 @@ class SimpleCallNode(CallNode):
# if some args are temps and others are not, they may get
# constructed in the wrong order (temps first) => make
# sure they are either all temps or all not temps
for
i
in
range
(
min
(
max_nargs
,
actual_nargs
)):
for
i
in
range
(
min
(
max_nargs
,
actual_nargs
)
-
1
):
arg
=
self
.
args
[
i
]
if
arg
.
is_name
and
arg
.
entry
and
(
arg
.
entry
.
is_local
or
arg
.
entry
.
in_closure
or
arg
.
entry
.
type
.
is_cfunction
):
# local variables are safe
#
TODO: what about the non-local keyword?
(
arg
.
entry
.
is_local
and
not
arg
.
entry
.
in_closure
)
or
arg
.
entry
.
type
.
is_cfunction
):
#
local variables and C functions are safe
pass
elif
env
.
nogil
and
arg
.
type
.
is_pyobject
:
# can't copy a Python reference into a temp in nogil
...
...
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