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
62205a58
Commit
62205a58
authored
Jul 07, 2021
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cypclass locking logic
parent
d1401b1e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
Cython/Compiler/CypclassTransforms.py
Cython/Compiler/CypclassTransforms.py
+5
-8
No files found.
Cython/Compiler/CypclassTransforms.py
View file @
62205a58
...
@@ -425,16 +425,13 @@ class CypclassLockTransform(Visitor.EnvTransform):
...
@@ -425,16 +425,13 @@ class CypclassLockTransform(Visitor.EnvTransform):
# that the receiver object will only be read, not that
# that the receiver object will only be read, not that
# __all__ the reachable subobjects will only be read.
# __all__ the reachable subobjects will only be read.
locally_writing
=
(
field_access
and
node
.
is_target
)
or
method_call
locally_writing
=
(
field_access
and
node
.
is_target
)
or
method_call
writing
=
self
.
writing
|
locally_writing
if
objtype
.
is_qualified_cyp_class
and
objtype
.
qualifier
==
'lock'
:
if
objtype
.
is_qualified_cyp_class
and
objtype
.
qualifier
==
'lock'
:
old_writing
=
self
.
writing
self
.
writing
=
False
self
.
writing
=
locally_writing
self
.
visitchildren
(
node
)
self
.
visitchildren
(
node
)
if
field_access
or
(
method_call
and
not
nodetype
.
self_qualifier
==
'lock'
):
if
field_access
or
(
method_call
and
not
nodetype
.
self_qualifier
==
'lock'
):
node
.
obj
=
ExprNodes
.
CoerceToLockedNode
(
node
.
obj
,
exclusive
=
self
.
writing
)
node
.
obj
=
ExprNodes
.
CoerceToLockedNode
(
node
.
obj
,
exclusive
=
writing
)
self
.
writing
=
old_writing
else
:
elif
objtype
.
is_cyp_class
:
self
.
writing
=
writing
old_writing
=
self
.
writing
self
.
writing
|=
locally_writing
self
.
visitchildren
(
node
)
self
.
visitchildren
(
node
)
self
.
writing
=
old_writing
return
node
return
node
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