Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
3c918b7f
Commit
3c918b7f
authored
Sep 25, 2008
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename TempsBlockNode.get_ref_node -> new_ref_node
parent
a67aaf75
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+4
-4
Cython/Compiler/TreeFragment.py
Cython/Compiler/TreeFragment.py
+1
-1
Cython/Compiler/UtilNodes.py
Cython/Compiler/UtilNodes.py
+1
-1
No files found.
Cython/Compiler/ParseTreeTransforms.py
View file @
3c918b7f
...
...
@@ -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
...
...
Cython/Compiler/TreeFragment.py
View file @
3c918b7f
...
...
@@ -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
...
...
Cython/Compiler/UtilNodes.py
View file @
3c918b7f
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment