Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
690c80f1
Commit
690c80f1
authored
Jan 20, 2015
by
peastman
Browse files
Fixed Fortran compilation errors caused by function names being too long
parent
d0e168ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
wrappers/generateWrappers.py
wrappers/generateWrappers.py
+4
-2
No files found.
wrappers/generateWrappers.py
View file @
690c80f1
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment