Skip to content

Commit 16be5ad

Browse files
authored
Fix deprecation warnings on 0.7 (#48)
1 parent cc7f9aa commit 16be5ad

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/gamma.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ end
4848

4949
function digamma(x::BigFloat)
5050
z = BigFloat()
51-
ccall((:mpfr_digamma, :libmpfr), Int32, (Ptr{BigFloat}, Ptr{BigFloat}, Int32), &z, &x, ROUNDING_MODE[])
51+
ccall((:mpfr_digamma, :libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}, Int32), z, x, ROUNDING_MODE[])
5252
return z
5353
end
5454

@@ -437,7 +437,7 @@ end
437437

438438
function zeta(x::BigFloat)
439439
z = BigFloat()
440-
ccall((:mpfr_zeta, :libmpfr), Int32, (Ptr{BigFloat}, Ptr{BigFloat}, Int32), &z, &x, ROUNDING_MODE[])
440+
ccall((:mpfr_zeta, :libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}, Int32), z, x, ROUNDING_MODE[])
441441
return z
442442
end
443443

test/runtests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ using Base.Test
55

66
const SF = SpecialFunctions
77

8+
if isdefined(Base, :MathConstants) && isdefined(Base.MathConstants, )
9+
import Base.MathConstants: γ
10+
end
11+
812
# useful test functions for relative error, which differ from isapprox
913
# in that relerrc separately looks at the real and imaginary parts
1014
relerr(z, x) = z == x ? 0.0 : abs(z - x) / abs(x)

0 commit comments

Comments
 (0)