Commit 271464ba authored by Xavier Thompson's avatar Xavier Thompson

Disallow sending 'locked&' instances to another thread

parent 5fa9a0ba
...@@ -2991,6 +2991,11 @@ class CppClassScope(Scope): ...@@ -2991,6 +2991,11 @@ class CppClassScope(Scope):
if (self.parent_type.is_cyp_class and type.is_static_method and name not in ("<alloc>", "__new__")): if (self.parent_type.is_cyp_class and type.is_static_method and name not in ("<alloc>", "__new__")):
entry.static_cname = "%s__static__%s" % (Naming.func_prefix, cname or name) entry.static_cname = "%s__static__%s" % (Naming.func_prefix, cname or name)
if type.self_qualifier in ('locked&',):
reify = False
if any(arg.type.is_qualified_cyp_class and arg.type.qualifier in ('locked&',) for arg in type.args):
reify = False
if reify: if reify:
self.reify_method(entry) self.reify_method(entry)
#if prev_entry and not defining: #if prev_entry and not defining:
......
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