mirror of
https://github.com/Z3Prover/z3
synced 2025-06-21 05:13:39 +00:00
Fix installation of custom error handler during context creation in OCaml bindings
This patch fixes a bug detected by valgrind, where a custom error handler did not get installed correctly.
This commit is contained in:
parent
324fcc6a13
commit
34bf4b1d3c
1 changed files with 5 additions and 3 deletions
|
@ -436,8 +436,10 @@ void MLErrorHandler(Z3_context c, Z3_error_code e)
|
||||||
n_* wrapper functions. */
|
n_* wrapper functions. */
|
||||||
}
|
}
|
||||||
|
|
||||||
void DLL_PUBLIC n_set_internal_error_handler(value a0)
|
CAMLprim value DLL_PUBLIC n_set_internal_error_handler(value ctx_v)
|
||||||
{
|
{
|
||||||
Z3_context _a0 = * (Z3_context*) Data_custom_val(a0);
|
CAMLparam1(ctx_v);
|
||||||
Z3_set_error_handler(_a0, MLErrorHandler);
|
Z3_context_plus ctx_p = *(Z3_context_plus*) Data_custom_val(ctx_v);
|
||||||
|
Z3_set_error_handler(ctx_p->ctx, MLErrorHandler);
|
||||||
|
CAMLreturn(Val_unit);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue