mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 20:05:51 +00:00
Translate correctly between OCaml option values and NULL pointers
This patch refactors the update_api script and the z3.ml implementation to properly translate between OCaml options and NULL pointers. Some unifications and simplifications (avoidance of unnecessary value allocation) in the script that creates the native bindings.
This commit is contained in:
parent
b85516c271
commit
f133f478c8
4 changed files with 451 additions and 475 deletions
|
@ -32,75 +32,5 @@ and optimize = ptr
|
|||
and param_descrs = ptr
|
||||
and rcf_num = ptr
|
||||
|
||||
external is_null : ptr -> bool
|
||||
= "n_is_null"
|
||||
|
||||
external mk_null : unit -> ptr
|
||||
= "n_mk_null"
|
||||
|
||||
external set_internal_error_handler : ptr -> unit
|
||||
= "n_set_internal_error_handler"
|
||||
|
||||
|
||||
external context_of_symbol : symbol -> context
|
||||
= "n_context_of_symbol"
|
||||
|
||||
external context_of_constructor : constructor -> context
|
||||
= "n_context_of_constructor"
|
||||
|
||||
external context_of_constructor_list : constructor_list -> context
|
||||
= "n_context_of_constructor_list"
|
||||
|
||||
external context_of_rcf_num : rcf_num -> context
|
||||
= "n_context_of_rcf_num"
|
||||
|
||||
|
||||
external context_of_ast : ast -> context
|
||||
= "n_context_of_ast"
|
||||
|
||||
external context_of_params : params -> context
|
||||
= "n_context_of_params"
|
||||
|
||||
external context_of_param_descrs : param_descrs -> context
|
||||
= "n_context_of_param_descrs"
|
||||
|
||||
external context_of_model : model -> context
|
||||
= "n_context_of_model"
|
||||
|
||||
external context_of_func_interp : func_interp -> context
|
||||
= "n_context_of_func_interp"
|
||||
|
||||
external context_of_func_entry : func_entry -> context
|
||||
= "n_context_of_func_entry"
|
||||
|
||||
external context_of_goal : goal -> context
|
||||
= "n_context_of_goal"
|
||||
|
||||
external context_of_tactic : tactic -> context
|
||||
= "n_context_of_tactic"
|
||||
|
||||
external context_of_probe : probe -> context
|
||||
= "n_context_of_probe"
|
||||
|
||||
external context_of_apply_result : apply_result -> context
|
||||
= "n_context_of_apply_result"
|
||||
|
||||
external context_of_solver : solver -> context
|
||||
= "n_context_of_solver"
|
||||
|
||||
external context_of_stats : stats -> context
|
||||
= "n_context_of_stats"
|
||||
|
||||
external context_of_ast_vector : ast_vector -> context
|
||||
= "n_context_of_ast_vector"
|
||||
|
||||
external context_of_ast_map : ast_map -> context
|
||||
= "n_context_of_ast_map"
|
||||
|
||||
external context_of_fixedpoint : fixedpoint -> context
|
||||
= "n_context_of_fixedpoint"
|
||||
|
||||
external context_of_optimize : optimize -> context
|
||||
= "n_context_of_optimize"
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue