3
0
Fork 0
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:
Christoph M. Wintersteiger 2013-02-08 18:54:44 +00:00
parent 2e2fa84d40
commit 91402f2060
5 changed files with 33 additions and 19 deletions

View file

@ -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) {