"platforms/opencl/vscode:/vscode.git/clone" did not exist on "d0f8db5950d445f7a71c3089659af822ee92ac9a"
Commit 6b6f7f19 authored by peastman's avatar peastman
Browse files

Fixed segfaults caused by errors in Fortran wrapper generation

parent b2caf6cc
...@@ -1134,14 +1134,14 @@ class FortranSourceGenerator(WrapperGenerator): ...@@ -1134,14 +1134,14 @@ class FortranSourceGenerator(WrapperGenerator):
return type return type
def isHandleType(self, type): def isHandleType(self, type):
if type.startswith('OpenMM_'): if type == 'OpenMM_Vec3':
return True; return False
if type == 'Vec3':
return True
if type.endswith('*') or type.endswith('&'): if type.endswith('*') or type.endswith('&'):
return self.isHandleType(type[:-1].strip()) return self.isHandleType(type[:-1].strip())
if type.startswith('const '): if type.startswith('const '):
return self.isHandleType(type[6:].strip()) return self.isHandleType(type[6:].strip())
if type.startswith('OpenMM_'):
return True;
return False return False
def writeOutput(self): def writeOutput(self):
......
...@@ -1665,14 +1665,14 @@ class FortranSourceGenerator(WrapperGenerator): ...@@ -1665,14 +1665,14 @@ class FortranSourceGenerator(WrapperGenerator):
return type return type
def isHandleType(self, type): def isHandleType(self, type):
if type.startswith('OpenMM_'): if type == 'OpenMM_Vec3':
return True; return False
if type == 'Vec3':
return True
if type.endswith('*') or type.endswith('&'): if type.endswith('*') or type.endswith('&'):
return self.isHandleType(type[:-1].strip()) return self.isHandleType(type[:-1].strip())
if type.startswith('const '): if type.startswith('const '):
return self.isHandleType(type[6:].strip()) return self.isHandleType(type[6:].strip())
if type.startswith('OpenMM_'):
return True;
return False return False
def writeOutput(self): def writeOutput(self):
......
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