[Java] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / src / main / java / org / ldk / structs / Result_u32GraphSyncErrorZ.java
index 0c9c0337b94900095473473c58707c71e4d536ce..ae52bee88875bea174e1391692e3fdef8b58a332 100644 (file)
@@ -13,6 +13,10 @@ public class Result_u32GraphSyncErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_u32GraphSyncErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_u32GraphSyncErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_u32GraphSyncErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_u32GraphSyncErrorZ_is_ok(ptr)) {
                        return new Result_u32GraphSyncErrorZ_OK(null, ptr);
@@ -34,7 +38,7 @@ public class Result_u32GraphSyncErrorZ extends CommonBase {
                        super(_dummy, ptr);
                        long err = bindings.CResult_u32GraphSyncErrorZ_get_err(ptr);
                        org.ldk.structs.GraphSyncError err_hu_conv = org.ldk.structs.GraphSyncError.constr_from_ptr(err);
-                       err_hu_conv.ptrs_to.add(this);
+                       if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
        }
@@ -53,11 +57,12 @@ public class Result_u32GraphSyncErrorZ extends CommonBase {
        /**
         * Creates a new CResult_u32GraphSyncErrorZ in the error state.
         */
-       public static Result_u32GraphSyncErrorZ err(GraphSyncError e) {
+       public static Result_u32GraphSyncErrorZ err(org.ldk.structs.GraphSyncError e) {
                long ret = bindings.CResult_u32GraphSyncErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_u32GraphSyncErrorZ ret_hu_conv = Result_u32GraphSyncErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }