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
a46f5295
Commit
a46f5295
authored
Feb 19, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Function overloading fixes.
parent
b3ebcbb8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+14
-11
No files found.
Cython/Compiler/ExprNodes.py
View file @
a46f5295
...
@@ -2580,23 +2580,26 @@ class SimpleCallNode(CallNode):
...
@@ -2580,23 +2580,26 @@ class SimpleCallNode(CallNode):
def
analyse_c_function_call
(
self
,
env
):
def
analyse_c_function_call
(
self
,
env
):
if
self
.
function
.
type
is
error_type
:
if
self
.
function
.
type
is
error_type
:
self
.
type
=
self
.
function
.
type
self
.
type
=
error_
type
return
return
if
self
.
function
.
type
.
is_cpp_class
:
if
self
.
function
.
type
.
is_cpp_class
:
function
=
self
.
function
.
type
.
scope
.
lookup
(
"operator()"
)
overloaded_entry
=
self
.
function
.
type
.
scope
.
lookup
(
"operator()"
)
if
function
is
None
:
if
overloaded_entry
is
None
:
self
.
type
=
PyrexTypes
.
error_type
self
.
type
=
PyrexTypes
.
error_type
self
.
result_code
=
"<error>"
self
.
result_code
=
"<error>"
return
return
elif
hasattr
(
self
.
function
,
'entry'
):
overloaded_entry
=
self
.
function
.
entry
else
:
else
:
function
=
self
.
function
.
entry
overloaded_entry
=
None
entry
=
PyrexTypes
.
best_match
(
self
.
args
,
function
.
all_alternatives
(),
self
.
pos
)
if
overloaded_entry
:
if
not
entry
:
entry
=
PyrexTypes
.
best_match
(
self
.
args
,
overloaded_entry
.
all_alternatives
(),
self
.
pos
)
self
.
type
=
PyrexTypes
.
error_type
if
not
entry
:
self
.
result_code
=
"<error>"
self
.
type
=
PyrexTypes
.
error_type
return
self
.
result_code
=
"<error>"
self
.
function
.
entry
=
entry
return
self
.
function
.
type
=
entry
.
type
self
.
function
.
entry
=
entry
self
.
function
.
type
=
entry
.
type
func_type
=
self
.
function_type
()
func_type
=
self
.
function_type
()
# Check no. of args
# Check no. of args
max_nargs
=
len
(
func_type
.
args
)
max_nargs
=
len
(
func_type
.
args
)
...
...
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