Skip to content

Commit 9703a80

Browse files
committed
do not use iso_c_binding
1 parent 2992305 commit 9703a80

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/stdlib_string_type.fypp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ module stdlib_string_type
1717
& to_title_ => to_title, to_sentence_ => to_sentence, reverse_ => reverse
1818
use stdlib_kinds, only : int8, int16, int32, int64, lk, c_bool
1919
use stdlib_optval, only: optval
20-
use iso_c_binding, only: c_loc,c_associated
2120
implicit none
2221
private
2322

@@ -682,8 +681,10 @@ contains
682681
elemental subroutine move_string_string(from, to)
683682
type(string_type), intent(inout), target :: from
684683
type(string_type), intent(inout), target :: to
684+
type(string_type), pointer :: fromp
685685

686-
if (c_associated(c_loc(from),c_loc(to))) return
686+
fromp => from
687+
if (associated(fromp,to)) return
687688
call move_alloc(from%raw, to%raw)
688689

689690
end subroutine move_string_string

0 commit comments

Comments
 (0)