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:
9fc211e
)
fix switch transform after changing boolean coercion of integer expressions
author
Stefan Behnel
<stefan_ml@behnel.de>
Sun, 21 Apr 2013 06:04:31 +0000
(08:04 +0200)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Sun, 21 Apr 2013 06:04:31 +0000
(08:04 +0200)
Cython/Compiler/Optimize.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Optimize.py
b/Cython/Compiler/Optimize.py
index
c381195
..
c560cfe
100644
(file)
--- a/
Cython/Compiler/Optimize.py
+++ b/
Cython/Compiler/Optimize.py
@@
-778,7
+778,8
@@
class SwitchTransform(Visitor.VisitorTransform):
def extract_conditions(self, cond, allow_not_in):
while True:
- if isinstance(cond, ExprNodes.CoerceToTempNode):
+ if isinstance(cond, (ExprNodes.CoerceToTempNode,
+ ExprNodes.CoerceToBooleanNode)):
cond = cond.arg
elif isinstance(cond, UtilNodes.EvalWithTempExprNode):
# this is what we get from the FlattenInListTransform