diff --git a/src/AlgAss/radical.jl b/src/AlgAss/radical.jl index 79f4079d2b..4dcca99381 100644 --- a/src/AlgAss/radical.jl +++ b/src/AlgAss/radical.jl @@ -366,7 +366,7 @@ function _lift!(A::zzModMatrix, B::fpMatrix, Mtemp) end function _lift!(A::zzModMatrix, B::FpMatrix, Mtemp::ZZMatrix) - ccall((:fmpz_mod_mat_get_fmpz_mat, libflint), Cvoid, (Ref{ZZMatrix}, Ref{FpMatrix}), Mtemp, B) + ccall((:fmpz_mod_mat_get_fmpz_mat, libflint), Cvoid, (Ref{ZZMatrix}, Ref{FpMatrix}, Ref{Nemo.fmpz_mod_ctx_struct}), Mtemp, B, base_ring(B).inv) ccall((:fmpz_mat_get_nmod_mat, libflint), Cvoid, (Ref{zzModMatrix}, Ref{ZZMatrix}), A, Mtemp) return A end diff --git a/src/Misc/FiniteField.jl b/src/Misc/FiniteField.jl index 4a2392d031..e006f6aa31 100644 --- a/src/Misc/FiniteField.jl +++ b/src/Misc/FiniteField.jl @@ -1,11 +1,11 @@ function _reduce(a::fqPolyRepFieldElem) A = parent(a) - if a.length < 2*degree(A) + #if a.length < 2*degree(A) ccall((:fq_nmod_reduce, libflint), Nothing, (Ref{fqPolyRepFieldElem}, Ref{fqPolyRepField}), a, A) - else - ccall((:nmod_poly_rem, libflint), Nothing, (Ref{fqPolyRepFieldElem}, Ref{fqPolyRepFieldElem}, Ref{Nothing}, Ref{Nothing}), a, a, pointer_from_objref(A)+6*sizeof(Int) + 2*sizeof(Ptr{Nothing}), pointer_from_objref(A)+sizeof(ZZRingElem)) - end + #else + # ccall((:nmod_poly_rem, libflint), Nothing, (Ref{fqPolyRepFieldElem}, Ref{fqPolyRepFieldElem}, Ref{Nothing}, Ref{Nothing}), a, a, pointer_from_objref(A)+6*sizeof(Int) + 2*sizeof(Ptr{Nothing}), pointer_from_objref(A)+sizeof(ZZRingElem)) + #end end function _reduce(a::FqPolyRepFieldElem) diff --git a/src/Misc/Matrix.jl b/src/Misc/Matrix.jl index 1822733979..981968021f 100644 --- a/src/Misc/Matrix.jl +++ b/src/Misc/Matrix.jl @@ -982,7 +982,7 @@ function invmod(M::ZZMatrix, d::ZZRingElem) for i = 1:nrows(M) S[i, i+nrows(M)] = 1 end - ccall((:fmpz_mod_mat_howell_form, libflint), Nothing, (Ref{ZZModMatrix}, ), S) + ccall((:fmpz_mod_mat_howell_form, libflint), Nothing, (Ref{ZZModMatrix}, Ref{Nemo.fmpz_mod_ctx_struct}), S, R.ninv) iM = S[1:nrows(M), nrows(M)+1:ncols(S)] #@assert iM*MR == identity_matrix(R, nrows(M)) return lift(iM)