Skip to content

Commit

Permalink
Fix potential GC issue with hash(::QQFieldElem) (#1943)
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored Nov 11, 2024
1 parent 9b83a72 commit d29b031
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flint/fmpq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ is_domain_type(::Type{QQFieldElem}) = true
###############################################################################

function Base.hash(a::QQFieldElem, h::UInt)
return _hash_integer(a.num, _hash_integer(a.den, h))
return GC.@preserve a _hash_integer(a.num, _hash_integer(a.den, h))
end

###############################################################################
Expand Down

0 comments on commit d29b031

Please sign in to comment.