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
ca7524f5
Commit
ca7524f5
authored
Aug 05, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert to considering cypclass args of def functions as not locked by the caller
parent
2c0d6064
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
10 deletions
+2
-10
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+1
-1
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+1
-9
No files found.
Cython/Compiler/Nodes.py
View file @
ca7524f5
...
...
@@ -3454,7 +3454,7 @@ class DefNode(FuncDefNode):
if
not
arg
.
name
:
error
(
arg
.
pos
,
"Missing argument name"
)
if
arg
.
needs_conversion
:
arg
.
entry
=
env
.
declare_var
(
arg
.
name
,
arg
.
type
,
arg
.
pos
,
is_converted_arg
=
1
)
arg
.
entry
=
env
.
declare_var
(
arg
.
name
,
arg
.
type
,
arg
.
pos
)
if
arg
.
type
.
is_pyobject
:
arg
.
entry
.
init
=
"0"
else
:
...
...
Cython/Compiler/Symtab.py
View file @
ca7524f5
...
...
@@ -2141,8 +2141,7 @@ class LocalScope(Scope):
def
declare_var
(
self
,
name
,
type
,
pos
,
cname
=
None
,
visibility
=
'private'
,
api
=
0
,
in_pxd
=
0
,
is_cdef
=
0
,
is_converted_arg
=
0
):
api
=
0
,
in_pxd
=
0
,
is_cdef
=
0
):
name
=
self
.
mangle_class_private_name
(
name
)
# Add an entry for a local variable.
if
visibility
in
(
'public'
,
'readonly'
):
...
...
@@ -2156,13 +2155,6 @@ class LocalScope(Scope):
entry
.
in_with_gil_block
=
self
.
_in_with_gil_block
self
.
var_entries
.
append
(
entry
)
# arguments converted as variables should still be locked as arguments
if
is_converted_arg
and
type
.
is_cyp_class
and
type
.
lock_mode
!=
"nolock"
:
arg_lock_state
=
self
.
declare_tracked
(
entry
)
arg_lock_state
.
is_rlocked
=
type
.
is_const
arg_lock_state
.
is_wlocked
=
not
type
.
is_const
return
entry
def
declare_global
(
self
,
name
,
pos
):
...
...
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