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
Gwenaël Samain
cython
Commits
8f1d9228
Commit
8f1d9228
authored
Jul 25, 2008
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed refcount optimization bug (introduced in refactor of cdef-assignment)
parent
cdabc958
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+10
-9
No files found.
Cython/Compiler/ExprNodes.py
View file @
8f1d9228
...
@@ -1031,20 +1031,21 @@ class NameNode(AtomicExprNode):
...
@@ -1031,20 +1031,21 @@ class NameNode(AtomicExprNode):
rhs
.
generate_disposal_code
(
code
)
rhs
.
generate_disposal_code
(
code
)
else
:
else
:
if
self
.
type
.
is_pyobject
and
not
self
.
skip_assignment_decref
:
if
self
.
type
.
is_pyobject
:
rhs
.
make_owned_reference
(
code
)
#print "NameNode.generate_assignment_code: to", self.name ###
#print "NameNode.generate_assignment_code: to", self.name ###
#print "...from", rhs ###
#print "...from", rhs ###
#print "...LHS type", self.type, "ctype", self.ctype() ###
#print "...LHS type", self.type, "ctype", self.ctype() ###
#print "...RHS type", rhs.type, "ctype", rhs.ctype() ###
#print "...RHS type", rhs.type, "ctype", rhs.ctype() ###
rhs
.
make_owned_reference
(
code
)
if
not
self
.
skip_assignment_decref
:
if
entry
.
is_local
and
not
Options
.
init_local_none
:
if
entry
.
is_local
and
not
Options
.
init_local_none
:
initalized
=
entry
.
scope
.
control_flow
.
get_state
((
entry
.
name
,
'initalized'
),
self
.
pos
)
initalized
=
entry
.
scope
.
control_flow
.
get_state
((
entry
.
name
,
'initalized'
),
self
.
pos
)
if
initalized
is
True
:
if
initalized
is
True
:
code
.
put_decref
(
self
.
result_code
,
self
.
ctype
())
elif
initalized
is
None
:
code
.
put_xdecref
(
self
.
result_code
,
self
.
ctype
())
else
:
code
.
put_decref
(
self
.
result_code
,
self
.
ctype
())
code
.
put_decref
(
self
.
result_code
,
self
.
ctype
())
elif
initalized
is
None
:
code
.
put_xdecref
(
self
.
result_code
,
self
.
ctype
())
else
:
code
.
put_decref
(
self
.
result_code
,
self
.
ctype
())
code
.
putln
(
'%s = %s;'
%
(
self
.
result_code
,
rhs
.
result_as
(
self
.
ctype
())))
code
.
putln
(
'%s = %s;'
%
(
self
.
result_code
,
rhs
.
result_as
(
self
.
ctype
())))
if
debug_disposal_code
:
if
debug_disposal_code
:
print
(
"NameNode.generate_assignment_code:"
)
print
(
"NameNode.generate_assignment_code:"
)
...
...
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