3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 19:05:51 +00:00

Java API: split incRef into incRef and addToReferenceQueue

One method should do one thing only, it's easy to mix things up
otherwise.
This commit is contained in:
George Karpenkov 2016-06-12 21:01:58 +02:00
parent 2a347f04bf
commit 22ffd65d1e
20 changed files with 150 additions and 87 deletions

View file

@ -23,8 +23,7 @@ import com.microsoft.z3.enumerations.Z3_goal_prec;
* A goal (aka problem). A goal is essentially a set of formulas, that can be
* solved and/or transformed using tactics and solvers.
**/
public class Goal extends Z3Object
{
public class Goal extends Z3Object {
/**
* The precision of the goal.
* Remarks: Goals can be transformed using over
@ -242,8 +241,12 @@ public class Goal extends Z3Object
}
@Override
void incRef(long o) {
Native.goalIncRef(getContext().nCtx(), o);
void incRef() {
Native.goalIncRef(getContext().nCtx(), getNativeObject());
}
@Override
void addToReferenceQueue() {
getContext().getGoalDRQ().storeReference(getContext(), this);
}
}