Skip to content

Commit

Permalink
explicit convert c_int to logical
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Sep 30, 2024
1 parent 020df2a commit f3dea2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Src/F_Interfaces/Base/AMReX_boxarray_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ pure function amrex_fi_boxarray_numpts (ba) bind(c)
integer(amrex_long) :: amrex_fi_boxarray_numpts
end function amrex_fi_boxarray_numpts

pure integer function amrex_fi_boxarray_intersects_box (ba, lo, hi) bind(c)
pure integer(c_int) function amrex_fi_boxarray_intersects_box (ba, lo, hi) bind(c)
import
implicit none
type(c_ptr), value, intent(in) :: ba
integer, intent(in) :: lo(*), hi(*)
end function amrex_fi_boxarray_intersects_box

pure integer function amrex_fi_boxarray_issame (baa, bab) bind(c)
pure integer(c_int) function amrex_fi_boxarray_issame (baa, bab) bind(c)
import
implicit none
type(c_ptr), value, intent(in) :: baa, bab
Expand Down Expand Up @@ -272,7 +272,7 @@ end function amrex_boxarray_intersects_box
pure logical function amrex_boxarray_issame(baa, bab) result(r)
type(amrex_boxarray), intent(in) :: baa
type(amrex_boxarray), intent(in) :: bab
r = amrex_fi_boxarray_issame(baa%p, bab%p)
r = amrex_fi_boxarray_issame(baa%p, bab%p) .ne. 0
end function amrex_boxarray_issame

end module amrex_boxarray_module
4 changes: 2 additions & 2 deletions Src/F_Interfaces/Base/AMReX_distromap_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ subroutine amrex_fi_print_distromap (dm) bind(c)
type(c_ptr), value :: dm
end subroutine amrex_fi_print_distromap

pure integer function amrex_fi_distromap_issame (dma, dmb) bind(c)
pure integer(c_int) function amrex_fi_distromap_issame (dma, dmb) bind(c)
import
implicit none
type(c_ptr), value, intent(in) :: dma, dmb
Expand Down Expand Up @@ -171,7 +171,7 @@ end subroutine amrex_distromap_print

pure logical function amrex_distromap_issame (dma, dmb) result(r)
type(amrex_distromap), intent(in) :: dma, dmb
r = amrex_fi_distromap_issame(dma%p, dmb%p)
r = amrex_fi_distromap_issame(dma%p, dmb%p) .ne. 0
end function amrex_distromap_issame

end module amrex_distromap_module

0 comments on commit f3dea2d

Please sign in to comment.