Commit c467a845 authored by Xavier Thompson's avatar Xavier Thompson

Fix nested class 'out-of-class' constructor definition being generated inside enclosing class

parent 4942e2b7
...@@ -911,6 +911,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -911,6 +911,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
for wrapper_entry in wrapper.all_alternatives(): for wrapper_entry in wrapper.all_alternatives():
if wrapper_entry.used or entry.type.templates: if wrapper_entry.used or entry.type.templates:
self.generate_cyp_class_wrapper_definition(entry.type, wrapper_entry, constructor, new, alloc, code) self.generate_cyp_class_wrapper_definition(entry.type, wrapper_entry, constructor, new, alloc, code)
# Generate deferred definitions for any nested types
self.generate_cyp_class_deferred_definitions(scope.sue_entries, code)
def generate_gcc33_hack(self, env, code): def generate_gcc33_hack(self, env, code):
# Workaround for spurious warning generation in gcc 3.3 # Workaround for spurious warning generation in gcc 3.3
...@@ -1009,7 +1011,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -1009,7 +1011,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.put(" : public %s" % base_class_decl) code.put(" : public %s" % base_class_decl)
code.putln(" {") code.putln(" {")
self.generate_type_header_code(scope.type_entries, code) self.generate_type_header_code(scope.type_entries, code)
self.generate_cyp_class_deferred_definitions(scope.sue_entries, code)
py_attrs = [e for e in scope.entries.values() py_attrs = [e for e in scope.entries.values()
if e.type.is_pyobject and not e.is_inherited] if e.type.is_pyobject and not e.is_inherited]
cypclass_attrs = [e for e in scope.var_entries cypclass_attrs = [e for e in scope.var_entries
......
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