Skip to content

Commit

Permalink
fix madnlp_c_set_option_bool
Browse files Browse the repository at this point in the history
  • Loading branch information
jgillis committed Jul 14, 2024
1 parent 2bcac46 commit 4c12791
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/generate_precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion src/MadNLP_C.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4c12791

Please sign in to comment.