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
Xavier Thompson
cython
Commits
8cfda3ec
Commit
8cfda3ec
authored
Nov 02, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure cypclass results of subscript always end up decref-ed
parent
85049a1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+8
-1
No files found.
Cython/Compiler/ExprNodes.py
View file @
8cfda3ec
...
...
@@ -3771,7 +3771,14 @@ class IndexNode(_IndexingBaseNode):
return
py_object_type
def
analyse_types
(
self
,
env
):
return
self
.
analyse_base_and_index_types
(
env
,
getting
=
True
)
index_node
=
self
.
analyse_base_and_index_types
(
env
,
getting
=
True
)
if
index_node
.
type
.
is_cyp_class
:
# If a[b] is a cypclass, a new reference is returned.
# In that case it must be stored for later decref-ing.
# XXX: future optimisation: only coerce to temporary
# when the value is not already assigned to a variable.
return
index_node
.
coerce_to_temp
(
env
)
return
index_node
def
analyse_target_types
(
self
,
env
):
node
=
self
.
analyse_base_and_index_types
(
env
,
setting
=
True
)
...
...
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