Skip to content

Commit 6029c87

Browse files
committed
Use ccall instead of @ccall
1 parent 0dbb891 commit 6029c87

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/CRlibm.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,8 @@ for f ∈ functions
5252
@eval $mpfr_f(x::Float32, r::RoundingMode) = Float32($mpfr_f(Float64(x), r), r)
5353
@eval $mpfr_f(x::Float64, r::RoundingMode) = Float64($mpfr_f(BigFloat(x; precision = precision(x)), r), r)
5454
@eval function $mpfr_f(x::BigFloat, r::RoundingMode)
55-
bigz = BigFloat(; precision = precision(x))
56-
@ccall Base.MPFR.libmpfr.$mpfr_f(
57-
bigz::Ref{BigFloat},
58-
x::Ref{BigFloat},
59-
r::Base.MPFR.MPFRRoundingMode
60-
)::Int32
55+
z = BigFloat(; precision = precision(x))
56+
ccall(($mpfr_f, Base.MPFR.libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}, Base.MPFR.MPFRRoundingMode), z, x, r)
6157
return bigz
6258
end
6359
end

0 commit comments

Comments
 (0)