Skip to content

Commit

Permalink
Fix @GC.preserve -> GC.@preserve
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 committed Oct 27, 2024
1 parent eea3f94 commit 9bb2bb6
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,

Check warning on line 953 in src/flint/fmpq_mpoly.jl

View check run for this annotation

Codecov / codecov/patch

src/flint/fmpq_mpoly.jl#L953

Added line #L953 was not covered by tests
(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,

Check warning on line 913 in src/flint/fmpz_mpoly.jl

View check run for this annotation

Codecov / codecov/patch

src/flint/fmpz_mpoly.jl#L913

Added line #L913 was not covered by tests
(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 9bb2bb6

Please sign in to comment.