projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
532bb1f
)
reduce code overhead for fused cpdef signature matching code
author
Stefan Behnel
<stefan_ml@behnel.de>
Fri, 11 May 2012 08:31:52 +0000
(10:31 +0200)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Fri, 11 May 2012 08:31:52 +0000
(10:31 +0200)
Cython/Compiler/FusedNode.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/FusedNode.py
b/Cython/Compiler/FusedNode.py
index
218c769
..
94e706c
100644
(file)
--- a/
Cython/Compiler/FusedNode.py
+++ b/
Cython/Compiler/FusedNode.py
@@
-576,10
+576,14
@@
class FusedCFuncDefNode(StatListNode):
u"""
candidates = []
for sig in signatures:
- match_found =
filter(None, dest_sig)
+ match_found =
False
for src_type, dst_type in zip(sig.strip('()').split(', '), dest_sig):
- if dst_type is not None and match_found:
- match_found = src_type == dst_type
+ if dst_type is not None:
+ if src_type == dst_type:
+ match_found = True
+ else:
+ match_found = False
+ break
if match_found:
candidates.append(sig)