Skip to content

Commit

Permalink
Fix @GC.preserve -> GC.@preserve (#1927)
Browse files Browse the repository at this point in the history
This old syntax has been deprecated for a long time.
  • Loading branch information
fingolfin authored Oct 27, 2024
1 parent 13e29a5 commit 9dd324d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/flint/fmpq_mpoly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ function set_exponent_vector!(a::QQMPolyRingElem, n::Int, exps::Vector{ZZRingEle
ccall((:fmpq_mpoly_resize, libflint), Nothing,
(Ref{QQMPolyRingElem}, Int, Ref{QQMPolyRing}), a, n, a.parent)
end
@GC.preserve exps ccall((:fmpq_mpoly_set_term_exp_fmpz, libflint), Nothing,
GC.@preserve exps ccall((:fmpq_mpoly_set_term_exp_fmpz, libflint), Nothing,
(Ref{QQMPolyRingElem}, Int, Ptr{ZZRingElem}, Ref{QQMPolyRing}),
a, n - 1, exps, parent(a))
return a
Expand Down
2 changes: 1 addition & 1 deletion src/flint/fmpz_mpoly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ function set_exponent_vector!(a::ZZMPolyRingElem, n::Int, exps::Vector{ZZRingEle
(Ref{ZZMPolyRingElem}, Int, Ref{ZZMPolyRing}), a, n, a.parent)
return a
end
@GC.preserve exps ccall((:fmpz_mpoly_set_term_exp_fmpz, libflint), Nothing,
GC.@preserve exps ccall((:fmpz_mpoly_set_term_exp_fmpz, libflint), Nothing,
(Ref{ZZMPolyRingElem}, Int, Ptr{ZZRingElem}, Ref{ZZMPolyRing}),
a, n - 1, exps, parent(a))
return a
Expand Down
2 changes: 1 addition & 1 deletion src/flint/fq_nmod.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function coeff(x::fqPolyRepFieldElem, n::Int)
end

function coeffs_raw(x::fqPolyRepFieldElem)
@GC.preserve x begin
GC.@preserve x begin
len = degree(parent(x))
V = unsafe_wrap(Vector{UInt}, reinterpret(Ptr{UInt}, x.coeffs), x.length)
Vcopy = Vector{UInt}(undef, len)
Expand Down

0 comments on commit 9dd324d

Please sign in to comment.