From 3ed855073c4c2c241171d90613a7d0c0f44f5eae Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 14 Nov 2010 18:34:04 +0100 Subject: [PATCH] support non-trivial switch() values in SwitchStatNode --- Cython/Compiler/Nodes.py | 1 + 1 file changed, 1 insertion(+) 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) -- 2.26.2