Skip to content

Commit ec95fa5

Browse files
authored
Fix macro callback. (#352)
1 parent 49e5a32 commit ec95fa5

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

src/utils.jl

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -231,17 +231,21 @@ end
231231
macro cplprogress(progressfunc)
232232
@static if Sys.ARCH == :aarch64
233233
@warn "User provided progress functions are unsupported on this architecture."
234-
return @cfunction(
235-
GDAL.gdaldummyprogress,
236-
Cint,
237-
(Cdouble, Cstring, Ptr{Cvoid})
238-
)
234+
quote
235+
@cfunction(
236+
$(Expr(:$, esc(GDAL.gdaldummyprogress))),
237+
Cint,
238+
(Cdouble, Cstring, Ptr{Cvoid})
239+
)
240+
end
239241
else
240-
return @cfunction(
241-
$(esc(progressfunc)),
242-
Cint,
243-
(Cdouble, Cstring, Ptr{Cvoid})
244-
)
242+
quote
243+
@cfunction(
244+
$(Expr(:$, esc(progressfunc))),
245+
Cint,
246+
(Cdouble, Cstring, Ptr{Cvoid})
247+
)
248+
end
245249
end
246250
end
247251

0 commit comments

Comments
 (0)