|
@@ -330,9 +330,13 @@ class MethodSpecification(FunctionSpecification):
|
|
|
# The method body will look something like
|
|
# The method body will look something like
|
|
|
# panda.Class_destructor(self.this)
|
|
# panda.Class_destructor(self.this)
|
|
|
self.outputCFunctionComment(file, nesting+2)
|
|
self.outputCFunctionComment(file, nesting+2)
|
|
|
- indent(file, nesting+2, 'if ' + self.typeDescriptor.moduleName + ':\n')
|
|
|
|
|
- indent(file, nesting+3, self.typeDescriptor.moduleName + '.'
|
|
|
|
|
- + self.typeDescriptor.wrapperName + '(self.this)\n')
|
|
|
|
|
|
|
+ functionName = (self.typeDescriptor.moduleName + '.'
|
|
|
|
|
+ + self.typeDescriptor.wrapperName)
|
|
|
|
|
+ # Make sure the module and function have not been deleted first
|
|
|
|
|
+ # This only happens during shutdown
|
|
|
|
|
+ indent(file, nesting+2, 'if (' + self.typeDescriptor.moduleName + ' and ' +
|
|
|
|
|
+ functionName + '):\n')
|
|
|
|
|
+ indent(file, nesting+3, functionName + '(self.this)\n')
|
|
|
|
|
|
|
|
def outputDestructorFooter(self, methodClass, file, nesting):
|
|
def outputDestructorFooter(self, methodClass, file, nesting):
|
|
|
indent(file, nesting+1, '\n')
|
|
indent(file, nesting+1, '\n')
|