From f77686209fd22aac2fa82b423a89df792fe10909 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 4 Oct 2009 14:42:13 +0200 Subject: [PATCH] fix temp var leak in for-range to for-from transformation --- Cython/Compiler/Nodes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index bdfd275b..4873ace4 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -3971,6 +3971,8 @@ class ForFromStatNode(LoopNode, StatNode): # depend on whether or not the loop is a python type. self.py_loopvar_node.generate_evaluation_code(code) self.target.generate_assignment_code(self.py_loopvar_node, code) + if from_range: + code.funcstate.release_temp(loopvar_name) break_label = code.break_label code.set_loop_labels(old_loop_labels) if self.else_clause: -- 2.26.2