Commit a1aed36c authored by gsamain's avatar gsamain

Use __activate__ entry when declaring it inside activable classes

parent d7092e57
...@@ -944,10 +944,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -944,10 +944,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
has_virtual_methods = False has_virtual_methods = False
constructor = None constructor = None
destructor = None destructor = None
activated_class_entry = scope.lookup_here("Activated") if entry.type.is_cyp_class and entry.type.activable:
if activated_class_entry: activated_class_entry = scope.lookup_here("Activated")
code.putln("struct %s;" % activated_class_entry.cname) code.putln("struct %s;" % activated_class_entry.cname)
code.putln("%s;" % activated_class_entry.type.declaration_code("__activate__(void)")) dunder_activate_entry = scope.lookup_here("__activate__")
code.putln("%s;" % dunder_activate_entry.type.declaration_code(dunder_activate_entry.cname))
for attr in scope.var_entries: for attr in scope.var_entries:
cname = attr.cname cname = attr.cname
if attr.type.is_cfunction and attr.type.is_static_method: if attr.type.is_cfunction and attr.type.is_static_method:
......
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