Skip to content

Commit 87c1d4f

Browse files
authored
Merge pull request #25022 from JuliaLang/yyc/mpfr-nopatch
Revert "Add patch to MPFR version (#23287)"
2 parents 67ba7bc + 0937ba0 commit 87c1d4f

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

base/mpfr.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,8 @@ import Base.Math.lgamma_r
2727

2828
import Base.FastMath.sincos_fast
2929

30-
function version()
31-
version = unsafe_string(ccall((:mpfr_get_version,:libmpfr), Ptr{Cchar}, ()))
32-
build = replace(unsafe_string(ccall((:mpfr_get_patches,:libmpfr), Ptr{Cchar}, ())), ' ', '.')
33-
isempty(build) ? VersionNumber(version) : VersionNumber(version * '+' * build)
34-
end
30+
version() = VersionNumber(unsafe_string(ccall((:mpfr_get_version,:libmpfr), Ptr{Cchar}, ())))
31+
patches() = split(unsafe_string(ccall((:mpfr_get_patches,:libmpfr), Ptr{Cchar}, ())),' ')
3532

3633
function __init__()
3734
try

test/mpfr.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ end
865865
end
866866
end
867867
# issue #22758
868-
if MPFR.version() > v"3.1.5" || "r11590" in MPFR.version().build
868+
if MPFR.version() > v"3.1.5" || "r11590" in MPFR.patches()
869869
setprecision(2_000_000) do
870870
@test abs(sin(big(pi)/6) - 0.5) < ldexp(big(1.0),-1_999_000)
871871
end

0 commit comments

Comments
 (0)