Commit 6f8179ed authored by Stefan Behnel's avatar Stefan Behnel

merge

parents 3819ab7f 746b968f
...@@ -2979,12 +2979,17 @@ class SimpleCallNode(CallNode): ...@@ -2979,12 +2979,17 @@ class SimpleCallNode(CallNode):
# sure they are either all temps or all not temps # 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)):
arg = self.args[i] 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 # local variables are safe
if not arg.is_name or arg.entry and (not arg.entry.is_local or arg.entry.in_closure): # TODO: what about the non-local keyword?
pass
elif env.nogil and arg.type.is_pyobject:
# can't copy a Python reference into a temp in nogil # can't copy a Python reference into a temp in nogil
# env (this is safe: a construction would fail in # env (this is safe: a construction would fail in
# nogil anyway) # nogil anyway)
if not (env.nogil and arg.type.is_pyobject): pass
else:
self.args[i] = arg.coerce_to_temp(env) self.args[i] = arg.coerce_to_temp(env)
for i in range(max_nargs, actual_nargs): for i in range(max_nargs, actual_nargs):
arg = self.args[i] arg = self.args[i]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment