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
29cf967f
Commit
29cf967f
authored
Jun 17, 2019
by
gsamain
Committed by
Xavier Thompson
Aug 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
With lock statement silently accept perceived inconsistent lock states for nolock cyobjects
parent
c638057c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+7
-6
No files found.
Cython/Compiler/Nodes.py
View file @
29cf967f
...
...
@@ -8471,14 +8471,15 @@ class LockCypclassNode(StatNode):
is_rlocked
=
self
.
obj
.
is_rhs_locked
(
env
)
is_wlocked
=
self
.
obj
.
is_lhs_locked
(
env
)
if
self
.
state
==
"unclocked"
and
not
(
is_rlocked
or
is_wlocked
):
error
(
self
.
pos
,
"Cannot unlock an already unlocked object !"
)
if
self
.
obj
.
type
.
lock_mode
!=
"nolock"
:
if
self
.
state
==
"unclocked"
and
not
(
is_rlocked
or
is_wlocked
):
error
(
self
.
pos
,
"Cannot unlock an already unlocked object !"
)
elif
self
.
state
==
"rlocked"
and
is_rlocked
:
error
(
self
.
pos
,
"Double read lock !"
)
elif
self
.
state
==
"rlocked"
and
is_rlocked
:
error
(
self
.
pos
,
"Double read lock !"
)
elif
self
.
state
==
"wlocked"
and
is_wlocked
:
error
(
self
.
pos
,
"Double write lock !"
)
elif
self
.
state
==
"wlocked"
and
is_wlocked
:
error
(
self
.
pos
,
"Double write lock !"
)
# We need to save states because in case of 'with unlocked' statement,
...
...
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