From: Stefan Behnel Date: Sun, 4 Oct 2009 12:42:13 +0000 (+0200) Subject: fix temp var leak in for-range to for-from transformation X-Git-Tag: 0.12.alpha0~182^2~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f77686209fd22aac2fa82b423a89df792fe10909;p=cython.git fix temp var leak in for-range to for-from transformation --- 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: