Skip to content

Commit

Permalink
fix: Base.GMP.MPZ.invert yielding return code instead of return value
Browse files Browse the repository at this point in the history
  • Loading branch information
NegaScout committed Dec 23, 2024
1 parent dde5028 commit 00cda38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/gmp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ end

invert!(x::BigInt, a::BigInt, b::BigInt) =
ccall((:__gmpz_invert, libgmp), Cint, (mpz_t, mpz_t, mpz_t), x, a, b)
invert(a::BigInt, b::BigInt) = invert!(BigInt(), a, b)
invert!(x::BigInt, b::BigInt) = invert!(x, x, b)
invert(a::BigInt, b::BigInt) = (ret=BigInt(); invert!(ret, a, b); ret)

for op in (:add_ui, :sub_ui, :mul_ui, :mul_2exp, :fdiv_q_2exp, :pow_ui, :bin_ui)
op! = Symbol(op, :!)
Expand Down

0 comments on commit 00cda38

Please sign in to comment.