X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FResult_NoneLightningErrorZ.java;h=ee0d03f41063a431a815e1687165ce86bad3846e;hb=ffdd56c967087cba7548599934585b8a9a3102e2;hp=823a07e356b5b14d52a464e5d0442de06806eb9e;hpb=8aa8a96fc6d8fcdd3fbb419b4b4c12482af14938;p=ldk-java diff --git a/src/main/java/org/ldk/structs/Result_NoneLightningErrorZ.java b/src/main/java/org/ldk/structs/Result_NoneLightningErrorZ.java index 823a07e3..ee0d03f4 100644 --- a/src/main/java/org/ldk/structs/Result_NoneLightningErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NoneLightningErrorZ.java @@ -13,6 +13,10 @@ public class Result_NoneLightningErrorZ extends CommonBase { if (ptr != 0) { bindings.CResult_NoneLightningErrorZ_free(ptr); } super.finalize(); } + protected void force_free() { + if (ptr != 0) { bindings.CResult_NoneLightningErrorZ_free(ptr); ptr = 0; } + } + static Result_NoneLightningErrorZ constr_from_ptr(long ptr) { if (bindings.CResult_NoneLightningErrorZ_is_ok(ptr)) { return new Result_NoneLightningErrorZ_OK(null, ptr); @@ -51,7 +55,7 @@ public class Result_NoneLightningErrorZ extends CommonBase { * Creates a new CResult_NoneLightningErrorZ in the error state. */ public static Result_NoneLightningErrorZ err(org.ldk.structs.LightningError e) { - long ret = bindings.CResult_NoneLightningErrorZ_err(e == null ? 0 : e.ptr); + long ret = bindings.CResult_NoneLightningErrorZ_err(e.ptr); Reference.reachabilityFence(e); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);