Skip to content

Commit 3ca28b1

Browse files
committed
Runic format
1 parent 9e0ab07 commit 3ca28b1

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/ccalls.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ macro debug_ccall(ex)
6161
# avoid task switches
6262
io = :(Core.stdout)
6363

64-
quote
64+
return quote
6565
print($io, $(string(target)), '(')
6666
for (i, arg) in enumerate(($(map(esc, args)...),))
6767
i > 1 && print($io, ", ")
@@ -115,13 +115,15 @@ function ccall_macro_lower(func, rettype, types, args, nreq)
115115
$(unsafe_convert_exprs...)
116116

117117
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+
)
120122
@ccall(jl_gc_safe_leave(gc_state::Int8)::Cvoid)
121123
ret
122124
end
123125

124-
quote
126+
return quote
125127
@inline
126128
$(cconvert_exprs...)
127129
GC.@preserve $(cconvert_args...) $(call)
@@ -136,5 +138,5 @@ useful for functions that may block, so that the GC isn't blocked from running,
136138
be required to prevent deadlocks (see JuliaGPU/CUDA.jl#2261).
137139
"""
138140
macro gcsafe_ccall(expr)
139-
ccall_macro_lower(Base.ccall_macro_parse(expr)...)
141+
return ccall_macro_lower(Base.ccall_macro_parse(expr)...)
140142
end

src/simpleversion.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ struct SimpleVersion
66
major::UInt32
77
minor::UInt32
88

9-
SimpleVersion(major, minor=0) = new(major, minor)
9+
SimpleVersion(major, minor = 0) = new(major, minor)
1010
end
1111

1212
function Base.tryparse(::Type{SimpleVersion}, v::AbstractString)
@@ -18,7 +18,7 @@ function Base.tryparse(::Type{SimpleVersion}, v::AbstractString)
1818
end
1919
any(isnothing, int_parts) && return nothing
2020

21-
SimpleVersion(int_parts...)
21+
return SimpleVersion(int_parts...)
2222
end
2323

2424
function Base.parse(::Type{SimpleVersion}, v::AbstractString)
@@ -38,5 +38,5 @@ SimpleVersion(v::AbstractString) = parse(SimpleVersion, v)
3838
end
3939

4040
macro sv_str(str)
41-
SimpleVersion(str)
41+
return SimpleVersion(str)
4242
end

0 commit comments

Comments
 (0)