Skip to content

Commit 653e92f

Browse files
committed
[Backport from ReSpect] Fix Fortran API functions for string passing
Some surface function save/load API functions declared the passed strings with the wrong data type: character(c_char), intent(in) :: name instead of: character(c_char), intent(in) :: name(*) (cherry picked from commit 7fc97c7384fb90f1266e59a70036667ab4fb60f6)
1 parent f3fd8f9 commit 653e92f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

api/pcmsolver.f90

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ module pcmsolver
4747
public pcmsolver_print_surface_function
4848
public pcmsolver_save_surface_functions
4949
public pcmsolver_save_surface_function
50+
public pcmsolver_save_surface_function_to_npz
5051
public pcmsolver_load_surface_function
5152
public pcmsolver_write_timings
5253

@@ -201,6 +202,14 @@ subroutine pcmsolver_save_surface_function(context, name) bind(C)
201202
character(kind=c_char, len=1), intent(in) :: name(*)
202203
end subroutine pcmsolver_save_surface_function
203204

205+
subroutine pcmsolver_save_surface_function_to_npz(context, npz_name, name, suffix) bind(C)
206+
import
207+
type(c_ptr), value :: context
208+
character(kind=c_char, len=1), intent(in) :: npz_name(*)
209+
character(kind=c_char, len=1), intent(in) :: name(*)
210+
character(kind=c_char, len=1), intent(in) :: suffix(*)
211+
end subroutine pcmsolver_save_surface_function_to_npz
212+
204213
subroutine pcmsolver_load_surface_function(context, name) bind(C)
205214
import
206215
type(c_ptr), value :: context

0 commit comments

Comments
 (0)