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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
84b6aae6
Commit
84b6aae6
authored
May 13, 2019
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cypclass refcount on arrays
parent
4a10a97c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+10
-3
No files found.
Cython/Compiler/ExprNodes.py
View file @
84b6aae6
...
...
@@ -4169,9 +4169,16 @@ class IndexNode(_IndexingBaseNode):
code
.
putln
(
"%s = %s;"
%
(
self
.
result
(),
rhs
.
result
()))
self
.
generate_subexpr_disposal_code
(
code
)
self
.
free_subexpr_temps
(
code
)
rhs
.
generate_disposal_code
(
code
)
if
self
.
type
.
is_cyp_class
:
# This hack is due to the fact cypclass objects are ref-counted, so
# they goes into temps, but their assignment code is a simple C assignment,
# which doesn't incref the temp.
# So we are effectively absorbing a reference in this case.
rhs
.
generate_post_assignment_code
(
code
)
else
:
self
.
generate_subexpr_disposal_code
(
code
)
self
.
free_subexpr_temps
(
code
)
rhs
.
generate_disposal_code
(
code
)
rhs
.
free_temps
(
code
)
def
_check_byte_value
(
self
,
code
,
rhs
):
...
...
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