Merge pull request #124 from TheBlueMatt/main
[ldk-java] / src / main / java / org / ldk / structs / ThreeTuple_RawInvoice_u832InvoiceSignatureZ.java
index b08a644e2d3459c12855721265d92ba040f5bac4..fc943321f6644ed8999330ff8d1d77e02e6000d1 100644 (file)
@@ -28,7 +28,7 @@ public class ThreeTuple_RawInvoice_u832InvoiceSignatureZ extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.RawInvoice ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RawInvoice(null, ret); }
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
@@ -49,7 +49,7 @@ public class ThreeTuple_RawInvoice_u832InvoiceSignatureZ extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.InvoiceSignature ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceSignature(null, ret); }
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
@@ -68,21 +68,23 @@ public class ThreeTuple_RawInvoice_u832InvoiceSignatureZ extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                ThreeTuple_RawInvoice_u832InvoiceSignatureZ ret_hu_conv = new ThreeTuple_RawInvoice_u832InvoiceSignatureZ(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
        /**
         * Creates a new C3Tuple_RawInvoice_u832InvoiceSignatureZ from the contained elements.
         */
-       public static ThreeTuple_RawInvoice_u832InvoiceSignatureZ of(RawInvoice a, byte[] b, InvoiceSignature c) {
-               long ret = bindings.C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a == null ? 0 : a.ptr & ~1, InternalUtils.check_arr_len(b, 32), c == null ? 0 : c.ptr & ~1);
+       public static ThreeTuple_RawInvoice_u832InvoiceSignatureZ of(org.ldk.structs.RawInvoice a, byte[] b, org.ldk.structs.InvoiceSignature c) {
+               long ret = bindings.C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a == null ? 0 : a.ptr, InternalUtils.check_arr_len(b, 32), c == null ? 0 : c.ptr);
                Reference.reachabilityFence(a);
                Reference.reachabilityFence(b);
                Reference.reachabilityFence(c);
                if (ret >= 0 && ret <= 4096) { return null; }
                ThreeTuple_RawInvoice_u832InvoiceSignatureZ ret_hu_conv = new ThreeTuple_RawInvoice_u832InvoiceSignatureZ(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(c); };
                return ret_hu_conv;
        }