summaryrefslogtreecommitdiff
path: root/Cython/Compiler/ParseTreeTransforms.py
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2014-08-10 19:07:39 +0200
committerStefan Behnel <stefan_ml@behnel.de>2014-08-10 19:07:39 +0200
commit457c0ee4440e4447304b4be26b2c48d6c19a122a (patch)
tree43e4f2fb8b24683d6af2e708e04a56a6ce022915 /Cython/Compiler/ParseTreeTransforms.py
parent135dc33c32a43f44a86a6349540728ae081949ac (diff)
downloadcython-457c0ee4440e4447304b4be26b2c48d6c19a122a.tar.gz
fix compiler crash when manager.__enter__() call node in with statement gets replaced
Diffstat (limited to 'Cython/Compiler/ParseTreeTransforms.py')
-rw-r--r--Cython/Compiler/ParseTreeTransforms.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py
index 72e89c01e..2db593a8a 100644
--- a/Cython/Compiler/ParseTreeTransforms.py
+++ b/Cython/Compiler/ParseTreeTransforms.py
@@ -1220,13 +1220,13 @@ class WithTransform(CythonTransform, SkipDeclarations):
self.visitchildren(node, 'body')
pos = node.pos
body, target, manager = node.body, node.target, node.manager
- node.enter_call = ExprNodes.SimpleCallNode(
+ node.enter_call = ExprNodes.ProxyNode(ExprNodes.SimpleCallNode(
pos, function=ExprNodes.AttributeNode(
pos, obj=ExprNodes.CloneNode(manager),
attribute=EncodedString('__enter__'),
is_special_lookup=True),
args=[],
- is_temp=True)
+ is_temp=True))
if target is not None:
body = Nodes.StatListNode(
pos, stats = [