X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FResult_ChannelTransactionParametersDecodeErrorZ.java;h=6a293d18cf9f707e64e1b22fb90c45fdcf9b908d;hb=eab9331afd014558a982441138e222999a9955d1;hp=37209e5b4d23b367717acf3a99a69791aa3eac97;hpb=47341beaeecf907f422f126500baf586d54a0d41;p=ldk-java diff --git a/src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java index 37209e5b..6a293d18 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java @@ -26,7 +26,7 @@ public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase super(_dummy, ptr); long res = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_get_ok(ptr); org.ldk.structs.ChannelTransactionParameters res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.ChannelTransactionParameters(null, res); } - res_hu_conv.ptrs_to.add(this); + if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); }; this.res = res_hu_conv; } } @@ -36,8 +36,8 @@ public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase private Result_ChannelTransactionParametersDecodeErrorZ_Err(Object _dummy, long ptr) { super(_dummy, ptr); long err = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_get_err(ptr); - org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); } - err_hu_conv.ptrs_to.add(this); + org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err); + if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); }; this.err = err_hu_conv; } } @@ -45,22 +45,24 @@ public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase /** * Creates a new CResult_ChannelTransactionParametersDecodeErrorZ in the success state. */ - public static Result_ChannelTransactionParametersDecodeErrorZ ok(ChannelTransactionParameters o) { - long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); + public static Result_ChannelTransactionParametersDecodeErrorZ ok(org.ldk.structs.ChannelTransactionParameters o) { + long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr); Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); }; return ret_hu_conv; } /** * Creates a new CResult_ChannelTransactionParametersDecodeErrorZ in the error state. */ - public static Result_ChannelTransactionParametersDecodeErrorZ err(DecodeError e) { - long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); + public static Result_ChannelTransactionParametersDecodeErrorZ err(org.ldk.structs.DecodeError e) { + long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(e.ptr); Reference.reachabilityFence(e); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); }; return ret_hu_conv; }