@@ -61,7 +61,7 @@ macro debug_ccall(ex)
61
61
# avoid task switches
62
62
io = :(Core. stdout )
63
63
64
- quote
64
+ return quote
65
65
print ($ io, $ (string (target)), ' (' )
66
66
for (i, arg) in enumerate (($ (map (esc, args)... ),))
67
67
i > 1 && print ($ io, " , " )
@@ -115,13 +115,15 @@ function ccall_macro_lower(func, rettype, types, args, nreq)
115
115
$ (unsafe_convert_exprs... )
116
116
117
117
gc_state = @ccall (jl_gc_safe_enter ():: Int8 )
118
- ret = ccall ($ (esc (func)), $ (esc (rettype)), $ (Expr (:tuple , map (esc, types)... )),
119
- $ (unsafe_convert_args... ))
118
+ ret = ccall (
119
+ $ (esc (func)), $ (esc (rettype)), $ (Expr (:tuple , map (esc, types)... )),
120
+ $ (unsafe_convert_args... )
121
+ )
120
122
@ccall (jl_gc_safe_leave (gc_state:: Int8 ):: Cvoid )
121
123
ret
122
124
end
123
125
124
- quote
126
+ return quote
125
127
@inline
126
128
$ (cconvert_exprs... )
127
129
GC. @preserve $ (cconvert_args... ) $ (call)
@@ -136,5 +138,5 @@ useful for functions that may block, so that the GC isn't blocked from running,
136
138
be required to prevent deadlocks (see JuliaGPU/CUDA.jl#2261).
137
139
"""
138
140
macro gcsafe_ccall (expr)
139
- ccall_macro_lower (Base. ccall_macro_parse (expr)... )
141
+ return ccall_macro_lower (Base. ccall_macro_parse (expr)... )
140
142
end
0 commit comments