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
139823ed
Commit
139823ed
authored
Mar 29, 2009
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Guard against the class of bugs which #267 was a member of
parent
6b36a27e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+4
-7
No files found.
Cython/Compiler/ExprNodes.py
View file @
139823ed
...
...
@@ -377,6 +377,7 @@ class ExprNode(Node):
# this must be a temp node and the specified variable
# is used as the result instead of allocating a new
# one.
assert
result
is
None
,
"deprecated, contact dagss if this triggers"
if
debug_temp_alloc
:
print
(
"%s Allocating temps"
%
self
)
self
.
allocate_subexpr_temps
(
env
)
...
...
@@ -613,7 +614,6 @@ class RemoveAllocateTemps(type):
setattr
(
cls
,
'release_temp'
,
noop
)
class
NewTempExprNode
(
ExprNode
):
backwards_compatible_result
=
None
temp_code
=
None
old_temp
=
None
# error checker for multiple frees etc.
...
...
@@ -636,8 +636,8 @@ class NewTempExprNode(ExprNode):
self
.
release_subexpr_temps
(
env
)
def
allocate_temps
(
self
,
env
,
result
=
None
):
assert
result
is
None
,
"deprecated, contact dagss if this triggers"
self
.
allocate_subexpr_temps
(
env
)
self
.
backwards_compatible_result
=
result
if
self
.
is_temp
:
self
.
release_subexpr_temps
(
env
)
...
...
@@ -657,11 +657,8 @@ class NewTempExprNode(ExprNode):
if
not
type
.
is_void
:
if
type
.
is_pyobject
:
type
=
PyrexTypes
.
py_object_type
if
self
.
backwards_compatible_result
:
self
.
temp_code
=
self
.
backwards_compatible_result
else
:
self
.
temp_code
=
code
.
funcstate
.
allocate_temp
(
type
,
manage_ref
=
True
)
self
.
temp_code
=
code
.
funcstate
.
allocate_temp
(
type
,
manage_ref
=
True
)
else
:
self
.
temp_code
=
None
...
...
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