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
fb11f2d4
Commit
fb11f2d4
authored
Sep 10, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Emit error when a const cypclass reference requires a write lock"
This reverts commit
b6313575
.
parent
dd96caaa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
11 deletions
+0
-11
Cython/Compiler/CypclassTransforms.py
Cython/Compiler/CypclassTransforms.py
+0
-3
tests/errors/cypclass_lock_error.pyx
tests/errors/cypclass_lock_error.pyx
+0
-8
No files found.
Cython/Compiler/CypclassTransforms.py
View file @
fb11f2d4
...
...
@@ -542,9 +542,6 @@ class CypclassLockTransform(Visitor.EnvTransform):
return
written_node
ref_id
=
self
.
reference_identifier
(
written_node
)
if
ref_id
:
if
ref_id
.
type
.
is_const
:
error
(
written_node
.
pos
,
"Reference '%s' is const but requires a write lock"
%
self
.
id_to_name
(
ref_id
))
return
written_node
if
not
self
.
wlocked
[
ref_id
]
>
0
:
if
lock_mode
==
"checklock"
:
error
(
written_node
.
pos
,
(
...
...
tests/errors/cypclass_lock_error.pyx
View file @
fb11f2d4
...
...
@@ -32,13 +32,6 @@ cdef void global_lock_taking():
with
wlocked
global_cyobject
:
global_cyobject
.
setter
(
global_cyobject
.
getter
()
+
1
)
cdef
take_non_const
(
A
a
):
pass
cdef
take_const
(
const
A
a
):
take_non_const
(
a
)
_ERRORS
=
u"""
20:4: Reference 'obj' is not correctly locked in this expression (write lock required)
21:4: Reference 'obj' is not correctly locked in this expression (read lock required)
...
...
@@ -47,5 +40,4 @@ _ERRORS = u"""
25:4: Reference 'obj' is not correctly locked in this expression (read lock required)
26:21: Reference 'obj' is not correctly locked in this expression (read lock required)
32:17: Can only lock local variables or arguments
40:19: Reference 'a' is const but requires a write lock
"""
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