projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba22565
)
fix coercion optimisation
author
Stefan Behnel
<scoder@users.berlios.de>
Thu, 15 Apr 2010 14:20:11 +0000
(16:20 +0200)
committer
Stefan Behnel
<scoder@users.berlios.de>
Thu, 15 Apr 2010 14:20:11 +0000
(16:20 +0200)
Cython/Compiler/Optimize.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Optimize.py
b/Cython/Compiler/Optimize.py
index cb2666e98ae70b49549416a3162732dc98467bcf..c9b24851f52ee16439faeadea2f9bfbd5873acbc 100644
(file)
--- a/
Cython/Compiler/Optimize.py
+++ b/
Cython/Compiler/Optimize.py
@@
-1044,6
+1044,8
@@
class OptimizeBuiltinCalls(Visitor.EnvTransform):
"""
self.visitchildren(node)
arg = node.arg
+ if isinstance(arg, ExprNodes.PyTypeTestNode):
+ arg = arg.arg
if isinstance(arg, ExprNodes.CoerceToPyTypeNode):
if arg.type in (PyrexTypes.py_object_type, Builtin.bool_type):
return arg.arg.coerce_to_boolean(self.current_env())