while loop needs temp disposal, too
authorStefan Behnel <scoder@users.berlios.de>
Tue, 2 Dec 2008 21:25:37 +0000 (22:25 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Tue, 2 Dec 2008 21:25:37 +0000 (22:25 +0100)
Cython/Compiler/Nodes.py

index 139432f26eae38752ad5626ea6d1ffd1da432ea0..41f304c43db6262c7fd3fb26277a33bf4e37c0b9 100644 (file)
@@ -3644,9 +3644,11 @@ class WhileStatNode(LoopNode, StatNode):
         code.putln(
             "while (1) {")
         self.condition.generate_evaluation_code(code)
+        self.condition.generate_disposal_code(code)
         code.putln(
             "if (!%s) break;" %
                 self.condition.result())
+        self.condition.free_temps(code)
         self.body.generate_execution_code(code)
         code.put_label(code.continue_label)
         code.putln("}")