Skip to content

Commit

Permalink
fix the "BeryBad" conversion error in 1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
fieker committed Dec 4, 2023
1 parent 07b4ccf commit 86ebe3a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Misc/FiniteField.jl
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ end


mutable struct VeryBad
entries::Ptr{Nothing}
entries::Ptr{UInt}
r::Int
c::Int
rows::Ptr{Nothing}
rows::Ptr{Ptr{UInt}}
n::UInt
ninv::UInt
norm::UInt
Expand All @@ -268,23 +268,23 @@ mutable struct VeryBad
r.ninv = ninv
r.norm = norm
r.r = 1
r.rr = [reinterpret(Ptr{Nothing}, 0)]
r.rows = Base.unsafe_convert(Ptr{Nothing}, r.rr)
r.rr = [reinterpret(Ptr{UInt}, 0)]
r.rows = pointer(r.rr)
return r
end

rr::Vector{Ptr{Nothing}}
rr::Vector{Ptr{UInt}}
end

function VeryBad!(V::VeryBad, a::fqPolyRepFieldElem)
V.c = a.length
V.entries = a.coeffs
V.entries = reinterpret(Ptr{UInt}, a.coeffs)

Check warning on line 281 in src/Misc/FiniteField.jl

View check run for this annotation

Codecov / codecov/patch

src/Misc/FiniteField.jl#L281

Added line #L281 was not covered by tests
V.rr[1] = a.coeffs
# V.rows = Base.unsafe_convert(Ptr{Nothing}, [a.coeffs])
end

function clear!(V::VeryBad)
V.entries = reinterpret(Ptr{Nothing}, 0)
V.entries = reinterpret(Ptr{Ptr{UInt}}, 0)

Check warning on line 287 in src/Misc/FiniteField.jl

View check run for this annotation

Codecov / codecov/patch

src/Misc/FiniteField.jl#L287

Added line #L287 was not covered by tests
# V.rows = reinterpret(Ptr{Nothing}, 0)
end

Expand Down

0 comments on commit 86ebe3a

Please sign in to comment.