Commit 1309790e authored by Xavier Thompson's avatar Xavier Thompson

Generate cdef class execution code after late type init (same solution as upstream)

parent 01d41d21
...@@ -5178,8 +5178,6 @@ class CClassDefNode(ClassDefNode): ...@@ -5178,8 +5178,6 @@ class CClassDefNode(ClassDefNode):
# This is needed to generate evaluation code for # This is needed to generate evaluation code for
# default values of method arguments. # default values of method arguments.
code.mark_pos(self.pos) code.mark_pos(self.pos)
if self.body:
self.body.generate_execution_code(code)
if not self.entry.type.early_init: if not self.entry.type.early_init:
if self.type_init_args: if self.type_init_args:
self.type_init_args.generate_evaluation_code(code) self.type_init_args.generate_evaluation_code(code)
...@@ -5207,6 +5205,8 @@ class CClassDefNode(ClassDefNode): ...@@ -5207,6 +5205,8 @@ class CClassDefNode(ClassDefNode):
self.type_init_args.free_temps(code) self.type_init_args.free_temps(code)
self.generate_type_ready_code(self.entry, code, True) self.generate_type_ready_code(self.entry, code, True)
if self.body:
self.body.generate_execution_code(code)
# Also called from ModuleNode for early init types. # Also called from ModuleNode for early init types.
@staticmethod @staticmethod
......
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