Skip to content

Commit 7bc379d

Browse files
authored
Use @ccall instead of ccall (#497)
This makes the call in libmpfr work on aarch64-apple-darwin.
1 parent 7e3f494 commit 7bc379d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "IntervalArithmetic"
22
uuid = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253"
33
repo = "https://github.com/JuliaIntervals/IntervalArithmetic.jl.git"
4-
version = "0.19.2"
4+
version = "0.20.0"
55

66
[deps]
77
CRlibm = "96374032-68de-5a5b-8d9e-752f78720389"
@@ -22,7 +22,7 @@ RecipesBase = "1.0"
2222
RoundingEmulator = "0.2"
2323
SetRounding = "0.2"
2424
StaticArrays = "0.8, 0.9, 0.10, 0.11, 0.12, 1.0"
25-
julia = "1.3, 1.4, 1.5"
25+
julia = "1.5"
2626

2727
[extras]
2828
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

src/display.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,11 @@ function round_string(x::BigFloat, digits::Int, r::RoundingMode)
156156
lng = digits + Int32(8)
157157
buf = Array{UInt8}(undef, lng + 1)
158158

159-
lng = ccall((:mpfr_snprintf, :libmpfr), Int32,
160-
(Ptr{UInt8}, Culong, Ptr{UInt8}, Int32, Ref{BigFloat}...),
161-
buf, lng + 1, "%.$(digits)R*g", to_mpfr(r), x)
159+
lng = @ccall "libmpfr".mpfr_snprintf(buf::Ptr{UInt8},
160+
(lng + 1)::Csize_t,
161+
"%.$(digits)R*g"::Ptr{UInt8};
162+
to_mpfr(r)::Cint,
163+
x::Ref{BigFloat})::Cint
162164

163165
repr = unsafe_string(pointer(buf))
164166

0 commit comments

Comments
 (0)