X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FResult_C2Tuple_SignatureCVec_SignatureZZNoneZ.java;h=e73013495e8335b05b21b4c445be8a2347a4e158;hb=1854b5cebef22ace9e9e4dd191f609818df9ce08;hp=cd08d347c5c5929784b7e4812c3f3a0b7bb5efd0;hpb=7aa095f42a570229656ab5fade9d966823b72e06;p=ldk-java diff --git a/src/main/java/org/ldk/structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.java b/src/main/java/org/ldk/structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.java index cd08d347..e7301349 100644 --- a/src/main/java/org/ldk/structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.java @@ -4,6 +4,7 @@ import org.ldk.impl.bindings; import org.ldk.enums.*; import org.ldk.util.*; import java.util.Arrays; +import java.lang.ref.Reference; import javax.annotation.Nullable; public class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ extends CommonBase { @@ -13,7 +14,7 @@ public class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ extends CommonBase { } static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ constr_from_ptr(long ptr) { - if (bindings.LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(ptr)) { + if (bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(ptr)) { return new Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_OK(null, ptr); } else { return new Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_Err(null, ptr); @@ -41,7 +42,8 @@ public class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ extends CommonBase { */ public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ok(TwoTuple_SignatureCVec_SignatureZZ o) { long ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o != null ? o.ptr : 0); - if (ret < 1024) { return null; } + Reference.reachabilityFence(o); + if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -51,18 +53,34 @@ public class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ extends CommonBase { */ public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ err() { long ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + /** * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ clone() { long ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(this.ptr); - if (ret < 1024) { return null; } + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret); return ret_hu_conv; }