mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 03:15:50 +00:00
Java bindings with no finalizers
Replacing finalizers with PhantomReferences, required quite a lot of changes to the codebase.
This commit is contained in:
parent
dfc80d3b69
commit
495ef0f055
48 changed files with 368 additions and 939 deletions
|
@ -28,7 +28,7 @@ public class FPNum extends FPExpr
|
|||
*/
|
||||
public boolean getSign() {
|
||||
Native.IntPtr res = new Native.IntPtr();
|
||||
if (Native.fpaGetNumeralSign(getContext().nCtx(), getNativeObject(), res) ^ true)
|
||||
if (!Native.fpaGetNumeralSign(getContext().nCtx(), getNativeObject(), res))
|
||||
throw new Z3Exception("Sign is not a Boolean value");
|
||||
return res.value != 0;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class FPNum extends FPExpr
|
|||
public long getSignificandUInt64()
|
||||
{
|
||||
Native.LongPtr res = new Native.LongPtr();
|
||||
if (Native.fpaGetNumeralSignificandUint64(getContext().nCtx(), getNativeObject(), res) ^ true)
|
||||
if (!Native.fpaGetNumeralSignificandUint64(getContext().nCtx(), getNativeObject(), res))
|
||||
throw new Z3Exception("Significand is not a 64 bit unsigned integer");
|
||||
return res.value;
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public class FPNum extends FPExpr
|
|||
*/
|
||||
public long getExponentInt64() {
|
||||
Native.LongPtr res = new Native.LongPtr();
|
||||
if (Native.fpaGetNumeralExponentInt64(getContext().nCtx(), getNativeObject(), res) ^ true)
|
||||
if (!Native.fpaGetNumeralExponentInt64(getContext().nCtx(), getNativeObject(), res))
|
||||
throw new Z3Exception("Exponent is not a 64 bit integer");
|
||||
return res.value;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue