mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
*** empty log message ***
This commit is contained in:
parent
f426cbc0a9
commit
82d52e4abc
@ -428,6 +428,7 @@ class MethodSpecification(FunctionSpecification):
|
||||
argTypes = self.typeDescriptor.argumentTypes
|
||||
thislessArgTypes = self.typeDescriptor.thislessArgTypes()
|
||||
self.outputTypeChecking(methodClass, thislessArgTypes, file, nesting+2)
|
||||
indent(file, nesting+2, 'upcastSelf = self\n')
|
||||
for i in range(len(parentList)):
|
||||
# Only output the upcast call if that parent class defines it
|
||||
parentClass = parentList[i]
|
||||
@ -435,10 +436,10 @@ class MethodSpecification(FunctionSpecification):
|
||||
if (i != 0):
|
||||
childClass = parentList[i-1]
|
||||
if childClass.hasMethodNamed(methodName):
|
||||
indent(file, nesting+2, 'upcastSelf = self.' + methodName + '()\n')
|
||||
indent(file, nesting+2, 'upcastSelf = upcastSelf.' + methodName + '()\n')
|
||||
else:
|
||||
if methodClass.hasMethodNamed(methodName):
|
||||
indent(file, nesting+2, 'upcastSelf = self.' + methodName + '()\n')
|
||||
indent(file, nesting+2, 'upcastSelf = upcastSelf.' + methodName + '()\n')
|
||||
indent(file, nesting+2, 'returnValue = ' + self.typeDescriptor.moduleName
|
||||
+ '.' + self.typeDescriptor.wrapperName + '(upcastSelf.this')
|
||||
if (len(thislessArgTypes) > 0):
|
||||
|
@ -228,6 +228,18 @@ class ClassTypeDescriptor(BaseTypeDescriptor):
|
||||
"""
|
||||
return self.foreignTypeName + '-extensions.py'
|
||||
|
||||
def getCModulesRecursively(self, parent):
|
||||
# Now look at all the methods that we might inherit if we are at
|
||||
# a multiple inheritance node and get their C modules
|
||||
for parentType in parent.parentTypes:
|
||||
for method in parentType.instanceMethods:
|
||||
if (not (method.typeDescriptor.moduleName in self.CModules)):
|
||||
self.CModules.append(method.typeDescriptor.moduleName)
|
||||
for method in parentType.upcastMethods:
|
||||
if (not (method.typeDescriptor.moduleName in self.CModules)):
|
||||
self.CModules.append(method.typeDescriptor.moduleName)
|
||||
self.getCModulesRecursively(parentType)
|
||||
|
||||
def getCModules(self):
|
||||
"""
|
||||
Return a list of all the C modules this class references
|
||||
@ -244,16 +256,8 @@ class ClassTypeDescriptor(BaseTypeDescriptor):
|
||||
if method:
|
||||
if (not (method.typeDescriptor.moduleName in self.CModules)):
|
||||
self.CModules.append(method.typeDescriptor.moduleName)
|
||||
# Now look at all the methods that we might inherit if we are at
|
||||
# a multiple inheritance node and get their C modules
|
||||
if (len(self.parentTypes) >= 2):
|
||||
for parentType in self.parentTypes:
|
||||
for method in parentType.instanceMethods:
|
||||
if (not (method.typeDescriptor.moduleName in self.CModules)):
|
||||
self.CModules.append(method.typeDescriptor.moduleName)
|
||||
for method in parentType.upcastMethods:
|
||||
if (not (method.typeDescriptor.moduleName in self.CModules)):
|
||||
self.CModules.append(method.typeDescriptor.moduleName)
|
||||
self.getCModulesRecursively(self)
|
||||
|
||||
return self.CModules
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user