projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac32ea7
)
support non-trivial switch() values in SwitchStatNode
author
Stefan Behnel
<scoder@users.berlios.de>
Sun, 14 Nov 2010 17:34:04 +0000
(18:34 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Sun, 14 Nov 2010 17:34:04 +0000
(18:34 +0100)
Cython/Compiler/Nodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Nodes.py
b/Cython/Compiler/Nodes.py
index f5a2bb73f3b2ad6ed49565781ef51a768647e9af..6556d9e2279cdbb32e63e8f6456660c126a33821 100644
(file)
--- a/
Cython/Compiler/Nodes.py
+++ b/
Cython/Compiler/Nodes.py
@@
-4105,6
+4105,7
@@
class SwitchStatNode(StatNode):
child_attrs = ['test', 'cases', 'else_clause']
def generate_execution_code(self, code):
+ self.test.generate_evaluation_code(code)
code.putln("switch (%s) {" % self.test.result())
for case in self.cases:
case.generate_execution_code(code)