mirror of
https://github.com/Z3Prover/z3
synced 2025-05-06 15:25:46 +00:00
C API: fixed mk_context/mk_context_rc exception behaviour
Adjusted .NET/Java APIs accordingly. Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
parent
2e2fa84d40
commit
91402f2060
5 changed files with 33 additions and 19 deletions
|
@ -419,17 +419,21 @@ namespace api {
|
|||
extern "C" {
|
||||
|
||||
Z3_context Z3_API Z3_mk_context(Z3_config c) {
|
||||
Z3_TRY;
|
||||
LOG_Z3_mk_context(c);
|
||||
memory::initialize(UINT_MAX);
|
||||
Z3_context r = reinterpret_cast<Z3_context>(alloc(api::context, reinterpret_cast<context_params*>(c), false));
|
||||
RETURN_Z3(r);
|
||||
Z3_CATCH_RETURN_NO_HANDLE(0);
|
||||
}
|
||||
|
||||
Z3_context Z3_API Z3_mk_context_rc(Z3_config c) {
|
||||
Z3_TRY;
|
||||
LOG_Z3_mk_context_rc(c);
|
||||
memory::initialize(UINT_MAX);
|
||||
Z3_context r = reinterpret_cast<Z3_context>(alloc(api::context, reinterpret_cast<context_params*>(c), true));
|
||||
RETURN_Z3(r);
|
||||
Z3_CATCH_RETURN_NO_HANDLE(0);
|
||||
}
|
||||
|
||||
void Z3_API Z3_del_context(Z3_context c) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue