mirror of
https://github.com/Z3Prover/z3
synced 2025-06-08 23:23:23 +00:00
more missing nullptr flexibility #5156
This commit is contained in:
parent
b1f5933c7d
commit
d91eac24b7
8 changed files with 20 additions and 10 deletions
|
@ -53,6 +53,7 @@ extern "C" {
|
||||||
Z3_TRY;
|
Z3_TRY;
|
||||||
LOG_Z3_ast_map_dec_ref(c, m);
|
LOG_Z3_ast_map_dec_ref(c, m);
|
||||||
RESET_ERROR_CODE();
|
RESET_ERROR_CODE();
|
||||||
|
if (m)
|
||||||
to_ast_map(m)->dec_ref();
|
to_ast_map(m)->dec_ref();
|
||||||
Z3_CATCH;
|
Z3_CATCH;
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,6 +243,7 @@ extern "C" {
|
||||||
Z3_TRY;
|
Z3_TRY;
|
||||||
LOG_Z3_fixedpoint_dec_ref(c, s);
|
LOG_Z3_fixedpoint_dec_ref(c, s);
|
||||||
RESET_ERROR_CODE();
|
RESET_ERROR_CODE();
|
||||||
|
if (s)
|
||||||
to_fixedpoint(s)->dec_ref();
|
to_fixedpoint(s)->dec_ref();
|
||||||
Z3_CATCH;
|
Z3_CATCH;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,7 @@ extern "C" {
|
||||||
Z3_TRY;
|
Z3_TRY;
|
||||||
LOG_Z3_goal_dec_ref(c, g);
|
LOG_Z3_goal_dec_ref(c, g);
|
||||||
RESET_ERROR_CODE();
|
RESET_ERROR_CODE();
|
||||||
|
if (g)
|
||||||
to_goal(g)->dec_ref();
|
to_goal(g)->dec_ref();
|
||||||
Z3_CATCH;
|
Z3_CATCH;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,7 @@ extern "C" {
|
||||||
Z3_TRY;
|
Z3_TRY;
|
||||||
LOG_Z3_optimize_dec_ref(c, o);
|
LOG_Z3_optimize_dec_ref(c, o);
|
||||||
RESET_ERROR_CODE();
|
RESET_ERROR_CODE();
|
||||||
|
if (o)
|
||||||
to_optimize(o)->dec_ref();
|
to_optimize(o)->dec_ref();
|
||||||
Z3_CATCH;
|
Z3_CATCH;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,7 @@ extern "C" {
|
||||||
Z3_TRY;
|
Z3_TRY;
|
||||||
LOG_Z3_params_dec_ref(c, p);
|
LOG_Z3_params_dec_ref(c, p);
|
||||||
RESET_ERROR_CODE();
|
RESET_ERROR_CODE();
|
||||||
|
if (p)
|
||||||
to_params(p)->dec_ref();
|
to_params(p)->dec_ref();
|
||||||
Z3_CATCH;
|
Z3_CATCH;
|
||||||
}
|
}
|
||||||
|
|
|
@ -402,6 +402,7 @@ extern "C" {
|
||||||
Z3_TRY;
|
Z3_TRY;
|
||||||
LOG_Z3_solver_dec_ref(c, s);
|
LOG_Z3_solver_dec_ref(c, s);
|
||||||
RESET_ERROR_CODE();
|
RESET_ERROR_CODE();
|
||||||
|
if (s)
|
||||||
to_solver(s)->dec_ref();
|
to_solver(s)->dec_ref();
|
||||||
Z3_CATCH;
|
Z3_CATCH;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,7 @@ extern "C" {
|
||||||
Z3_TRY;
|
Z3_TRY;
|
||||||
LOG_Z3_stats_dec_ref(c, s);
|
LOG_Z3_stats_dec_ref(c, s);
|
||||||
RESET_ERROR_CODE();
|
RESET_ERROR_CODE();
|
||||||
|
if (s)
|
||||||
to_stats(s)->dec_ref();
|
to_stats(s)->dec_ref();
|
||||||
Z3_CATCH;
|
Z3_CATCH;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,7 @@ extern "C" {
|
||||||
Z3_TRY;
|
Z3_TRY;
|
||||||
LOG_Z3_tactic_dec_ref(c, t);
|
LOG_Z3_tactic_dec_ref(c, t);
|
||||||
RESET_ERROR_CODE();
|
RESET_ERROR_CODE();
|
||||||
|
if (t)
|
||||||
to_tactic(t)->dec_ref();
|
to_tactic(t)->dec_ref();
|
||||||
Z3_CATCH;
|
Z3_CATCH;
|
||||||
}
|
}
|
||||||
|
@ -104,6 +105,7 @@ extern "C" {
|
||||||
Z3_TRY;
|
Z3_TRY;
|
||||||
LOG_Z3_probe_dec_ref(c, p);
|
LOG_Z3_probe_dec_ref(c, p);
|
||||||
RESET_ERROR_CODE();
|
RESET_ERROR_CODE();
|
||||||
|
if (p)
|
||||||
to_probe(p)->dec_ref();
|
to_probe(p)->dec_ref();
|
||||||
Z3_CATCH;
|
Z3_CATCH;
|
||||||
}
|
}
|
||||||
|
@ -476,6 +478,7 @@ extern "C" {
|
||||||
Z3_TRY;
|
Z3_TRY;
|
||||||
LOG_Z3_apply_result_dec_ref(c, r);
|
LOG_Z3_apply_result_dec_ref(c, r);
|
||||||
RESET_ERROR_CODE();
|
RESET_ERROR_CODE();
|
||||||
|
if (r)
|
||||||
to_apply_result(r)->dec_ref();
|
to_apply_result(r)->dec_ref();
|
||||||
Z3_CATCH;
|
Z3_CATCH;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue