Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename f_c_string to bml_f_c_string to avoid conflict (issue 744) #753

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Fortran-interface/bml_fc_tools_m.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module bml_fc_tools_m
implicit none
private

public :: f_c_string
public :: bml_f_c_string

integer, parameter :: LEN_C_NULL_CHAR = len(C_NULL_CHAR)

Expand All @@ -25,13 +25,13 @@ end function len_f_c_string
!!
!! \param fstr Fortran string.
!! \return cstr The Fortran string terminated with C NULL.
pure function f_c_string(fstr) result(cstr)
pure function bml_f_c_string(fstr) result(cstr)

character(len=*, kind=C_CHAR), intent(in) :: fstr
character(len=len_f_c_string(fstr), kind=C_CHAR) :: cstr

cstr = trim(fstr)//C_NULL_CHAR

end function f_c_string
end function bml_f_c_string

end module bml_fc_tools_m
4 changes: 2 additions & 2 deletions src/Fortran-interface/bml_utilities_m.F90
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ subroutine bml_read_matrix(a, filename)
character(len=*, kind=C_CHAR), intent(in) :: filename
type(bml_matrix_t), intent(in) :: a

call bml_read_bml_matrix_C(a%ptr, f_c_string(filename))
call bml_read_bml_matrix_C(a%ptr, bml_f_c_string(filename))

end subroutine bml_read_matrix

Expand All @@ -89,7 +89,7 @@ subroutine bml_write_matrix(a, filename)
character(len=*, kind=C_CHAR), intent(in) :: filename
type(bml_matrix_t), intent(in) :: a

call bml_write_bml_matrix_C(a%ptr, f_c_string(filename))
call bml_write_bml_matrix_C(a%ptr, bml_f_c_string(filename))

end subroutine bml_write_matrix

Expand Down
Loading