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
Gwenaël Samain
cython
Commits
18a182e9
Commit
18a182e9
authored
Jun 28, 2019
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make args lock depend on their const-ness
parent
dea8da4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-1
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+2
-1
No files found.
Cython/Compiler/Nodes.py
View file @
18a182e9
...
...
@@ -2599,7 +2599,8 @@ class CFuncDefNode(FuncDefNode):
entry
.
is_variable
=
1
# Even if it is checklock it should be OK to mess with self without locking
self_locking_state
=
self
.
local_scope
.
declare_tracked
(
entry
)
self_locking_state
.
is_wlocked
=
True
self_locking_state
.
is_rlocked
=
self
.
is_const_method
self_locking_state
.
is_wlocked
=
not
self
.
is_const_method
def
declare_cpdef_wrapper
(
self
,
env
):
if
self
.
overridable
:
...
...
Cython/Compiler/Symtab.py
View file @
18a182e9
...
...
@@ -1825,7 +1825,8 @@ class LocalScope(Scope):
entry
.
is_arg
=
1
if
type
.
is_cyp_class
and
type
.
lock_mode
==
"autolock"
:
arg_lock_state
=
self
.
declare_tracked
(
entry
)
arg_lock_state
.
is_wlocked
=
True
arg_lock_state
.
is_rlocked
=
type
.
is_const
arg_lock_state
.
is_wlocked
=
not
type
.
is_const
#entry.borrowed = 1 # Not using borrowed arg refs for now
self
.
arg_entries
.
append
(
entry
)
return
entry
...
...
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