mirror of
https://github.com/Z3Prover/z3
synced 2025-05-18 13:05:33 +00:00
optimizations to api ctx ref counting
This commit is contained in:
parent
eb2ee34dfe
commit
6e5ced0080
3 changed files with 24 additions and 12 deletions
|
@ -19,8 +19,8 @@ Revision History:
|
|||
|
||||
#include "util/params.h"
|
||||
#include "util/lbool.h"
|
||||
#include "util/mutex.h"
|
||||
#include "ast/ast.h"
|
||||
#include <atomic>
|
||||
|
||||
#define Z3_TRY try {
|
||||
#define Z3_CATCH_CORE(CODE) } catch (z3_exception & ex) { mk_c(c)->handle_exception(ex); CODE }
|
||||
|
@ -88,7 +88,6 @@ inline lbool to_lbool(Z3_lbool b) { return static_cast<lbool>(b); }
|
|||
struct Z3_params_ref : public api::object {
|
||||
params_ref m_params;
|
||||
Z3_params_ref(api::context& c): api::object(c) {}
|
||||
~Z3_params_ref() override {}
|
||||
};
|
||||
|
||||
inline Z3_params_ref * to_params(Z3_params p) { return reinterpret_cast<Z3_params_ref *>(p); }
|
||||
|
@ -98,7 +97,6 @@ inline params_ref& to_param_ref(Z3_params p) { return p == nullptr ? const_cast<
|
|||
struct Z3_param_descrs_ref : public api::object {
|
||||
param_descrs m_descrs;
|
||||
Z3_param_descrs_ref(api::context& c): api::object(c) {}
|
||||
~Z3_param_descrs_ref() override {}
|
||||
};
|
||||
|
||||
inline Z3_param_descrs_ref * to_param_descrs(Z3_param_descrs p) { return reinterpret_cast<Z3_param_descrs_ref *>(p); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue