Commit 690c80f1 authored by peastman's avatar peastman
Browse files

Fixed Fortran compilation errors caused by function names being too long

parent d0e168ad
...@@ -974,6 +974,7 @@ class FortranHeaderGenerator(WrapperGenerator): ...@@ -974,6 +974,7 @@ class FortranHeaderGenerator(WrapperGenerator):
hasReturnValue = (returnType in ('integer*4', 'real*8')) hasReturnValue = (returnType in ('integer*4', 'real*8'))
hasReturnArg = not (hasReturnValue or returnType == 'void') hasReturnArg = not (hasReturnValue or returnType == 'void')
functionName = "%s_%s" % (typeName, methodName) functionName = "%s_%s" % (typeName, methodName)
functionName = functionName[:63]
if hasReturnValue: if hasReturnValue:
self.out.write(" function ") self.out.write(" function ")
else: else:
...@@ -1517,8 +1518,9 @@ class FortranSourceGenerator(WrapperGenerator): ...@@ -1517,8 +1518,9 @@ class FortranSourceGenerator(WrapperGenerator):
# There are two identical methods that differ only in whether they are const. Skip the const one. # There are two identical methods that differ only in whether they are const. Skip the const one.
continue continue
functionName = "%s_%s" % (typeName, methodName) functionName = "%s_%s" % (typeName, methodName)
self.writeOneMethod(classNode, methodNode, functionName, functionName.lower()+'_') truncatedName = functionName[:63]
self.writeOneMethod(classNode, methodNode, functionName, functionName.upper()) self.writeOneMethod(classNode, methodNode, functionName, truncatedName.lower()+'_')
self.writeOneMethod(classNode, methodNode, functionName, truncatedName.upper())
def writeOneConstructor(self, classNode, methodNode, functionName, wrapperFunctionName): def writeOneConstructor(self, classNode, methodNode, functionName, wrapperFunctionName):
className = getText("compoundname", classNode) className = getText("compoundname", classNode)
......
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