From: Robert Bradshaw Date: Fri, 12 Nov 2010 08:52:02 +0000 (-0800) Subject: One more buffer fix. X-Git-Tag: 0.14.alpha0~178^2~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=36e017b28d20e717179a1a94ff0374aa50e17188;p=cython.git One more buffer fix. --- 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]