Commit 66c98e8a authored by Xavier Thompson's avatar Xavier Thompson

Treat cypclass attributes of c class differently from normal cpp attributes

parent fb8e2af1
...@@ -2055,8 +2055,10 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -2055,8 +2055,10 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
dict_slot = None dict_slot = None
_, (py_attrs, _, memoryview_slices) = scope.get_refcounted_entries() _, (py_attrs, _, memoryview_slices) = scope.get_refcounted_entries()
# cyp_class attributes should not be treated as normal cpp_class attributes
cpp_class_attrs = [entry for entry in scope.var_entries cpp_class_attrs = [entry for entry in scope.var_entries
if entry.type.is_cpp_class] if entry.type.is_cpp_class and not entry.type.is_cyp_class]
if py_attrs or cpp_class_attrs or memoryview_slices or weakref_slot or dict_slot: if py_attrs or cpp_class_attrs or memoryview_slices or weakref_slot or dict_slot:
self.generate_self_cast(scope, code) self.generate_self_cast(scope, code)
......
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