diff --git a/compiler/generate_precompile.jl b/compiler/generate_precompile.jl index ac30745..b98c6bf 100644 --- a/compiler/generate_precompile.jl +++ b/compiler/generate_precompile.jl @@ -160,7 +160,7 @@ for (lin_solver_id,print_level, max_iters) in cases madnlp_c_set_option_int(s, unsafe_convert(Ptr{Int8},"lin_solver_id"), lin_solver_id) madnlp_c_set_option_int(s, unsafe_convert(Ptr{Int8},"max_iters"), max_iters) madnlp_c_set_option_int(s, unsafe_convert(Ptr{Int8},"print_level"), print_level) - madnlp_c_set_option_bool(s, unsafe_convert(Ptr{Int8},"minimize"), minimize) + madnlp_c_set_option_bool(s, unsafe_convert(Ptr{Int8},"minimize"), Int64(minimize)) Cret = madnlp_c_solve(s) diff --git a/src/MadNLP_C.jl b/src/MadNLP_C.jl index 8e6c577..57ddb10 100644 --- a/src/MadNLP_C.jl +++ b/src/MadNLP_C.jl @@ -376,7 +376,7 @@ end Base.@ccallable function madnlp_c_set_option_bool(s::Ptr{MadnlpCSolver}, name::Ptr{Cchar}, val::Int64)::Cint try - set_option(s, unsafe_string(name), Bool(val)) + set_option(s, unsafe_string(name), val) catch e return 1 end