]> git.bitcoin.ninja Git - ldk-java/blobdiff - src/main/java/org/ldk/structs/Result_InvoiceFeaturesDecodeErrorZ.java
Support passing trait instance references from C to Java without clone or double...
[ldk-java] / src / main / java / org / ldk / structs / Result_InvoiceFeaturesDecodeErrorZ.java
index 01af7fb3a3c6d919d3288e60072a913bab6c7357..2de17bc3cc9e8c7747fff1327df18784863dc60e 100644 (file)
@@ -4,6 +4,7 @@ import org.ldk.impl.bindings;
 import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
+import javax.annotation.Nullable;
 
 public class Result_InvoiceFeaturesDecodeErrorZ extends CommonBase {
        private Result_InvoiceFeaturesDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
@@ -45,8 +46,8 @@ public class Result_InvoiceFeaturesDecodeErrorZ extends CommonBase {
         */
        public static Result_InvoiceFeaturesDecodeErrorZ ok(InvoiceFeatures o) {
                long ret = bindings.CResult_InvoiceFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+               if (ret >= 0 && ret < 1024) { return null; }
                Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
@@ -55,8 +56,8 @@ public class Result_InvoiceFeaturesDecodeErrorZ extends CommonBase {
         */
        public static Result_InvoiceFeaturesDecodeErrorZ err(DecodeError e) {
                long ret = bindings.CResult_InvoiceFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+               if (ret >= 0 && ret < 1024) { return null; }
                Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(e);
                return ret_hu_conv;
        }