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
5 years ago
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cypclass refcount on arrays
parent
4a10a97c
Changes
1
Show 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,6 +4169,13 @@ class IndexNode(_IndexingBaseNode):
...
@@ -4169,6 +4169,13 @@ class IndexNode(_IndexingBaseNode):
code
.
putln
(
code
.
putln
(
"%s = %s;"
%
(
self
.
result
(),
rhs
.
result
()))
"%s = %s;"
%
(
self
.
result
(),
rhs
.
result
()))
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
.
generate_subexpr_disposal_code
(
code
)
self
.
free_subexpr_temps
(
code
)
self
.
free_subexpr_temps
(
code
)
rhs
.
generate_disposal_code
(
code
)
rhs
.
generate_disposal_code
(
code
)
...
...
This diff is collapsed.
Click to expand it.
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