diff --git a/deps/parselibs.jl b/deps/parselibs.jl index 2510a9295..afe471bba 100644 --- a/deps/parselibs.jl +++ b/deps/parselibs.jl @@ -34,8 +34,7 @@ open(output_filename, "w") do outputfile error("from libparse: $(libs.stderr)") end libs_splitted = split(libs.stdout,"\n")[4:end-1] - libs_splitted = [ split(i," ") for i in libs_splitted ] - libs_splitted = [ [ j for j in i if j != ""] for i in libs_splitted ] + libs_splitted = [ split(i," ", keepempty = false) for i in libs_splitted ] println(outputfile, ":$(i[1:end - 4]) => [") for j in libs_splitted println(outputfile, """[ "$(j[1])", "$(j[3])" ],""") diff --git a/deps/src/caller.cpp b/deps/src/caller.cpp index b606a10a4..6237284f4 100644 --- a/deps/src/caller.cpp +++ b/deps/src/caller.cpp @@ -6,8 +6,6 @@ #include #include -// #include - static jl_value_t * jl_int64_vector_type; static jl_value_t * jl_int64_matrix_type; static jl_value_t * jl_singular_number_type; diff --git a/deps/src/coeffs.cpp b/deps/src/coeffs.cpp index b7457f2b3..608f3b57a 100644 --- a/deps/src/coeffs.cpp +++ b/deps/src/coeffs.cpp @@ -38,14 +38,12 @@ void singular_define_coeffs(jlcxx::Module & Singular) }); Singular.method("n_Delete", [](snumber * n, coeffs cf) { - number * t = &n; if (n != NULL) { - n_Delete(t, cf); + n_Delete(&n, cf); } }); Singular.method("n_Delete_Q", [](snumber * n, coeffs cf) { - ; if (n != NULL) { n_Delete(&n, cf); } diff --git a/src/LibSingular.jl b/src/LibSingular.jl index 5f4ec47de..d1974b01b 100644 --- a/src/LibSingular.jl +++ b/src/LibSingular.jl @@ -1,7 +1,6 @@ module libSingular import Libdl - using CxxWrap @wrapmodule(realpath(joinpath(@__DIR__, "..", "local", "lib", "libsingularwrap." * Libdl.dlext))) diff --git a/src/caller.jl b/src/caller.jl index d2e4d2438..f6254f12f 100644 --- a/src/caller.jl +++ b/src/caller.jl @@ -47,7 +47,7 @@ end function convert_return_value(single_value, rng = nothing) if single_value[1] - error("recieved list instead of single value") + error("received list instead of single value") end cast = casting_functions[single_value[3]][1](single_value[2]) if cast isa Array{Any} diff --git a/src/resolution/resolution.jl b/src/resolution/resolution.jl index 0290360f1..c6ead15d2 100644 --- a/src/resolution/resolution.jl +++ b/src/resolution/resolution.jl @@ -21,7 +21,7 @@ elem_type(::ResolutionSet{T}) where T <: AbstractAlgebra.RingElem = sresolution{ parent_type(::Type{sresolution{T}}) where T <: AbstractAlgebra.RingElem = ResolutionSet{T} function checkbounds(r::sresolution, i::Int) - (i < 1 || i > libSingular.get_sySize(r.ptr)) && throw(BoundsError(r, i)) + (i < 1 || i > length(r)) && throw(BoundsError(r, i)) end function getindex(r::sresolution, i::Int) @@ -105,7 +105,7 @@ end function show(io::IO, r::sresolution) println(io, "Singular Resolution:") - len = libSingular.get_sySize(r.ptr) + len = length(r) if len > 0 ptr = libSingular.getindex_internal(r.ptr,0,r.minimal) if ptr.cpp_object != C_NULL