Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix @GC.preserve -> GC.@preserve #1663

Merged
merged 1 commit into from
Oct 27, 2024
Merged

Conversation

fingolfin
Copy link
Contributor

This old syntax has been deprecated for a long time

This old syntax has been deprecated for a long time
Copy link

codecov bot commented Oct 27, 2024

Codecov Report

Attention: Patch coverage is 31.25000% with 11 lines in your changes missing coverage. Please review.

Project coverage is 75.95%. Comparing base (7900721) to head (80669f0).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/QuadForm/LineOrbits.jl 21.42% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1663      +/-   ##
==========================================
- Coverage   75.97%   75.95%   -0.03%     
==========================================
  Files         361      361              
  Lines      113783   113784       +1     
==========================================
- Hits        86451    86427      -24     
- Misses      27332    27357      +25     
Files with missing lines Coverage Δ
src/Misc/Matrix.jl 76.87% <100.00%> (ø)
src/QuadForm/LineOrbits.jl 48.64% <21.42%> (ø)

... and 27 files with indirect coverage changes

@thofma thofma enabled auto-merge (squash) October 27, 2024 12:11
@thofma thofma merged commit 4cb3cb9 into thofma:master Oct 27, 2024
17 checks passed
@fingolfin fingolfin deleted the mh/GC_macro branch October 27, 2024 15:31
@@ -312,11 +312,11 @@ function Base.getindex(H::Hecke.HenselCtx, s::Symbol, i::Int)
return unsafe_load(H.link, i)
elseif s == :v
f = Hecke.Globals.Zx()
@GC.preserve f H ccall((:fmpz_poly_set, Nemo.libflint), Cvoid, (Ref{ZZPolyRingElem}, Ptr{Hecke.fmpz_poly_raw}), f, H.v+(i-1)*sizeof(Hecke.fmpz_poly_raw))
GC.@preserve f H ccall((:fmpz_poly_set, Nemo.libflint), Cvoid, (Ref{ZZPolyRingElem}, Ptr{Hecke.fmpz_poly_raw}), f, H.v+(i-1)*sizeof(Hecke.fmpz_poly_raw))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there actually a point in using preserve on a single ccall? (I know its my code, but..)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I think so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants