From: Dag Sverre Seljebotn Date: Sat, 29 Nov 2008 22:20:51 +0000 (+0100) Subject: Converted IteratorNode to new temps, fixes #124 X-Git-Tag: 0.11-beta~182 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6fb8b96311ea4f14c5d6dc705b44351fd49707ee;p=cython.git Converted IteratorNode to new temps, fixes #124 --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 0d20c53b..a29b2c67 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -1349,7 +1349,7 @@ class ImportNode(ExprNode): code.error_goto_if_null(self.result(), self.pos))) -class IteratorNode(ExprNode): +class IteratorNode(NewTempExprNode): # Used as part of for statement implementation. # # allocate_counter_temp/release_counter_temp needs to be called diff --git a/tests/run/ticket_124.pyx b/tests/run/ticket_124.pyx new file mode 100644 index 00000000..5f9b23a3 --- /dev/null +++ b/tests/run/ticket_124.pyx @@ -0,0 +1,8 @@ +""" +>>> spam(dict(test=2)) +False +""" +def spam(dict d): + for elm in d: + return False + return True