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
b4224faf
Commit
b4224faf
authored
Oct 08, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove invalid increfs on cypclass result of subscript operation
parent
31149c7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+17
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
b4224faf
...
...
@@ -4220,6 +4220,23 @@ class IndexNode(_IndexingBaseNode):
# This is a bug
raise
InternalError
(
"Couldn't find the right signature"
)
def
coerce_to_temp
(
self
,
env
):
temp
=
ExprNode
.
coerce_to_temp
(
self
,
env
)
if
self
.
type
.
is_cyp_class
and
not
(
self
.
base
.
type
.
is_array
or
self
.
base
.
type
.
is_ptr
):
# This is already a new reference
# either via cpp operator[]
# or via cypclass __getitem__
temp
.
use_managed_ref
=
False
return
temp
def
make_owned_reference
(
self
,
code
):
if
self
.
type
.
is_cyp_class
and
not
(
self
.
base
.
type
.
is_array
or
self
.
base
.
type
.
is_ptr
):
# This is already a new reference
# either via cpp operator[]
# or via cypclass __getitem__
return
ExprNode
.
make_owned_reference
(
self
,
code
)
gil_message
=
"Indexing Python object"
def
calculate_result_code
(
self
):
...
...
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