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
Boxiang Sun
cython
Commits
10eca7ff
Commit
10eca7ff
authored
Jan 28, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
last call argument doesn't need to be simple, so don't force it into a temp
parent
f726f409
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+7
-3
No files found.
Cython/Compiler/ExprNodes.py
View file @
10eca7ff
...
...
@@ -2966,9 +2966,13 @@ class SimpleCallNode(CallNode):
self
.
is_temp
=
1
# Coerce arguments
some_args_in_temps
=
False
for
i
in
range
(
min
(
max_nargs
,
actual_nargs
)):
max_fitting_arg_count
=
min
(
max_nargs
,
actual_nargs
)
for
i
in
range
(
max_fitting_arg_count
):
formal_type
=
func_type
.
args
[
i
].
type
arg
=
self
.
args
[
i
].
coerce_to
(
formal_type
,
env
).
coerce_to_simple
(
env
)
arg
=
self
.
args
[
i
].
coerce_to
(
formal_type
,
env
)
if
i
<
max_fitting_arg_count
-
1
:
# last argument will be evaluated last either way
arg
=
arg
.
coerce_to_simple
(
env
)
if
arg
.
is_temp
:
if
i
>
0
:
# first argument doesn't matter
some_args_in_temps
=
True
...
...
@@ -2992,7 +2996,7 @@ 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
(
m
in
(
max_nargs
,
actual_nargs
)
-
1
):
for
i
in
range
(
m
ax_fitting_arg_count
-
1
):
if
i
==
0
and
self
.
self
is
not
None
:
continue
# self is ok
arg
=
self
.
args
[
i
]
...
...
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