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
9478c113
Commit
9478c113
authored
Jul 31, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure sequences are properly read-locked in for-loops
parent
ebdc01e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+11
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
9478c113
...
...
@@ -2837,6 +2837,17 @@ class IteratorNode(ExprNode):
return
sequence_type
return
py_object_type
def
ensure_rhs_locked
(
self
,
env
,
is_dereferenced
=
False
):
self
.
sequence
.
ensure_rhs_locked
(
env
,
is_dereferenced
=
True
)
if
not
self
.
tracked_state
:
self
.
get_tracked_state
(
env
)
if
is_dereferenced
and
self
.
tracked_state
:
if
not
self
.
is_rhs_locked
(
env
):
if
self
.
is_checklock
():
error
(
self
.
pos
,
"This expression is not correctly locked (read lock needed)"
)
elif
self
.
is_autolock
():
self
.
set_autorlock
(
env
)
def
analyse_cpp_types
(
self
,
env
):
sequence_type
=
self
.
sequence
.
type
if
sequence_type
.
is_ptr
:
...
...
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