From: Stefan Behnel Date: Sun, 14 Nov 2010 17:34:04 +0000 (+0100) Subject: support non-trivial switch() values in SwitchStatNode X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3ed855073c4c2c241171d90613a7d0c0f44f5eae;p=cython.git support non-trivial switch() values in SwitchStatNode --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index f5a2bb73..6556d9e2 100644 --- 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)