Skip to content

Commit

Permalink
Fix more syntax for ifort's malloc/free
Browse files Browse the repository at this point in the history
  • Loading branch information
godotalgorithm committed Nov 7, 2024
1 parent ca9c1c8 commit 4e0bf5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/interface/mopac_api_createdestroy.F90
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ module function create_int(size)
#else
integer(c_intptr_t) :: dummy
integer(c_int) :: mold
dummy = malloc(c_sizeof(mold)*size(1))
dummy = malloc(c_sizeof(mold)*size)
create_int = transfer(dummy, create_int)
#endif
end function create_int
Expand All @@ -137,7 +137,7 @@ module function create_int2(size, size2)
#else
integer(c_intptr_t) :: dummy
integer(c_int) :: mold
dummy = malloc(c_sizeof(mold)*size(1)*size(2))
dummy = malloc(c_sizeof(mold)*size*size2)
create_int2 = transfer(dummy, create_int2)
#endif
end function create_int2
Expand All @@ -156,7 +156,7 @@ module function create_real(size)
#else
integer(c_intptr_t) :: dummy
real(c_double) :: mold
dummy = malloc(c_sizeof(mold)*size(1))
dummy = malloc(c_sizeof(mold)*size)
create_real = transfer(dummy, create_real)
#endif
end function create_real
Expand Down

0 comments on commit 4e0bf5c

Please sign in to comment.