Rename TempsBlockNode.get_ref_node -> new_ref_node
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Wed, 24 Sep 2008 22:03:14 +0000 (00:03 +0200)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Wed, 24 Sep 2008 22:03:14 +0000 (00:03 +0200)
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/TreeFragment.py
Cython/Compiler/UtilNodes.py

index 26d0db2b28a1341ffe47e6ddb2c6c396058bd6c0..ffd136de1c599430466aedbc0a865de19536077a 100644 (file)
@@ -439,20 +439,20 @@ class WithTransform(CythonTransform):
                 u'EXPR' : node.manager,
                 u'BODY' : node.body,
                 u'TARGET' : node.target,
-                u'EXCINFO' : excinfo_tempblock.get_ref_node(0, node.pos)
+                u'EXCINFO' : excinfo_tempblock.new_ref_node(0, node.pos)
                 }, pos=node.pos)
             # Set except excinfo target to EXCINFO
             result.body.stats[4].body.stats[0].except_clauses[0].excinfo_target = (
-             excinfo_tempblock.get_ref_node(0, node.pos))
+             excinfo_tempblock.new_ref_node(0, node.pos))
         else:
             result = self.template_without_target.substitute({
                 u'EXPR' : node.manager,
                 u'BODY' : node.body,
-                u'EXCINFO' : excinfo_tempblock.get_ref_node(0, node.pos)
+                u'EXCINFO' : excinfo_tempblock.new_ref_node(0, node.pos)
                 }, pos=node.pos)
             # Set except excinfo target to EXCINFO
             result.body.stats[4].body.stats[0].except_clauses[0].excinfo_target = (
-                excinfo_tempblock.get_ref_node(0, node.pos))
+                excinfo_tempblock.new_ref_node(0, node.pos))
 
         excinfo_tempblock.body = result
         return excinfo_tempblock
index fa301de8938180b6117fbd5db0f26ff98547f698..fcbc81e055d5ad49dd9e640198c633f2a2b7be92 100644 (file)
@@ -158,7 +158,7 @@ class TemplateTransform(VisitorTransform):
             return self.try_substitution(node, node.name)
         else:
             # Replace name with temporary
-            return self.tempblock.get_ref_node(tmpidx, self.get_pos(node))
+            return self.tempblock.new_ref_node(tmpidx, self.get_pos(node))
 
     def visit_ExprStatNode(self, node):
         # If an expression-as-statement consists of only a replaceable
index 9def39aa7d8609a7ef3396ef9bf130b9787b5ae8..9a217ea7e15885e52741c405bef8f6d62c5c838e 100644 (file)
@@ -58,7 +58,7 @@ class TempsBlockNode(Node):
         self.handles = [TempHandle(t) for t in types]
         Node.__init__(self, pos, body=body)
 
-    def get_ref_node(self, index, pos):
+    def new_ref_node(self, index, pos):
         handle = self.handles[index]
         return TempRefNode(pos, handle=handle, type=handle.type)