From 36e017b28d20e717179a1a94ff0374aa50e17188 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Fri, 12 Nov 2010 00:52:02 -0800 Subject: [PATCH] One more buffer fix. --- Cython/Compiler/ParseTreeTransforms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index 6692ca08..0a21e0bd 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -1220,7 +1220,9 @@ class ExpandInplaceOperators(CythonTransform): return node def side_effect_free_reference(node, setting=False): - if node.type.is_pyobject and not setting: + if isinstance(node, NameNode): + return node, [] + elif node.type.is_pyobject and not setting: node = LetRefNode(node) return node, [node] elif isinstance(node, IndexNode): @@ -1232,8 +1234,6 @@ class ExpandInplaceOperators(CythonTransform): elif isinstance(node, AttributeNode): obj, temps = side_effect_free_reference(node.obj) return AttributeNode(node.pos, obj=obj, attribute=node.attribute), temps - elif isinstance(node, NameNode): - return node, [] else: node = LetRefNode(node) return node, [node] -- 2.26.2