Commit 7d0be031 authored by gsamain's avatar gsamain Committed by Xavier Thompson

Fix function call argument lock analysis

parent 4e342623
...@@ -6147,10 +6147,11 @@ class SimpleCallNode(CallNode): ...@@ -6147,10 +6147,11 @@ class SimpleCallNode(CallNode):
formal_arg = func_type.args[i] formal_arg = func_type.args[i]
actual_arg = self.args[i] actual_arg = self.args[i]
deref_flag = formal_arg.type.is_cyp_class deref_flag = formal_arg.type.is_cyp_class
if isinstance(formal_arg.type, PyrexTypes.CConstOrVolatileType) and formal_arg.type.is_const: wlock_flag = deref_flag and not formal_arg.type.is_const
actual_arg.ensure_rhs_locked(env, is_dereferenced = deref_flag) if wlock_flag:
actual_arg.ensure_lhs_locked(env, is_dereferenced = True)
else: else:
actual_arg.ensure_lhs_locked(env, is_dereferenced = deref_flag) actual_arg.ensure_rhs_locked(env, is_dereferenced = deref_flag)
# XXX - Should we do something in a pyfunc case ? # XXX - Should we do something in a pyfunc case ?
if func_type.is_const_method: if func_type.is_const_method:
self.function.ensure_rhs_locked(env) self.function.ensure_rhs_locked(env)
......
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