X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FResult_NoneLightningErrorZ.java;h=c12eea949d940aacbd2cb1863eb2f8f9b8a16417;hb=65a17b9ef4884736783566e30e075ca59b472cc7;hp=7f150a19215bc7238681f16ac3e52c76a54ee492;hpb=c45b91b3165ba0ff774d12d357188cae979574d3;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 7f150a19..c12eea94 100644 --- a/src/main/java/org/ldk/structs/Result_NoneLightningErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NoneLightningErrorZ.java @@ -38,8 +38,9 @@ public class Result_NoneLightningErrorZ extends CommonBase { /** * Creates a new CResult_NoneLightningErrorZ in the success state. */ - public static Result_NoneLightningErrorZ constructor_ok() { + public static Result_NoneLightningErrorZ ok() { long ret = bindings.CResult_NoneLightningErrorZ_ok(); + if (ret < 1024) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -47,8 +48,9 @@ public class Result_NoneLightningErrorZ extends CommonBase { /** * Creates a new CResult_NoneLightningErrorZ in the error state. */ - public static Result_NoneLightningErrorZ constructor_err(LightningError e) { + public static Result_NoneLightningErrorZ err(LightningError e) { long ret = bindings.CResult_NoneLightningErrorZ_err(e == null ? 0 : e.ptr & ~1); + if (ret < 1024) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(e); return ret_hu_conv; @@ -60,6 +62,7 @@ public class Result_NoneLightningErrorZ extends CommonBase { */ public Result_NoneLightningErrorZ clone() { long ret = bindings.CResult_NoneLightningErrorZ_clone(this.ptr); + if (ret < 1024) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); return ret_hu_conv; }