fix upcast to renamed class
This commit is contained in:
parent
beae245e5a
commit
8f72ae5079
|
|
@ -490,8 +490,13 @@ class FFIInterrogateDatabase:
|
|||
typeDescs = self.constructFunctionTypeDescriptors(funcIndex)
|
||||
for typeDesc in typeDescs:
|
||||
funcSpec = FFISpecs.MethodSpecification()
|
||||
funcSpec.name = FFIRename.methodNameFromCppName(
|
||||
interrogate_function_name(funcIndex))
|
||||
# We synthesize the upcast function name instead
|
||||
# of using the name supplied by interrogate, to
|
||||
# allow for possible renaming of types on this
|
||||
# side.
|
||||
funcSpec.name = 'upcastTo' + typeDesc.returnType.typeDescriptor.foreignTypeName
|
||||
#funcSpec.name = FFIRename.methodNameFromCppName(
|
||||
# interrogate_function_name(funcIndex))
|
||||
funcSpec.typeDescriptor = typeDesc
|
||||
funcSpec.index = funcIndex
|
||||
funcSpecs.append(funcSpec)
|
||||
|
|
|
|||
|
|
@ -473,9 +473,14 @@ class MethodSpecification(FunctionSpecification):
|
|||
childClass = parentList[i-1]
|
||||
if childClass.hasMethodNamed(methodName):
|
||||
indent(file, nesting+2, 'upcastSelf = upcastSelf.' + methodName + '()\n')
|
||||
else:
|
||||
indent(file, nesting+2, '# upcastSelf = upcastSelf.' + methodName + '()\n')
|
||||
else:
|
||||
if methodClass.hasMethodNamed(methodName):
|
||||
indent(file, nesting+2, 'upcastSelf = upcastSelf.' + methodName + '()\n')
|
||||
else:
|
||||
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):
|
||||
|
|
|
|||
Loading…
Reference in New Issue