Commit ca7524f5 authored by Xavier Thompson's avatar Xavier Thompson

Revert to considering cypclass args of def functions as not locked by the caller

parent 2c0d6064
......@@ -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:
......
......@@ -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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment