[Java] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / src / main / java / org / ldk / structs / Result_PendingHTLCInfoInboundHTLCErrZ.java
index ea9cc8aadd781becbfaae0f53abb3b54b828ba0d..77402cb3484ec9b301cfff593bd666f0f6721287 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PendingHTLCInfoInboundHTLCErrZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PendingHTLCInfoInboundHTLCErrZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_is_ok(ptr)) {
                        return new Result_PendingHTLCInfoInboundHTLCErrZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_PendingHTLCInfoInboundHTLCErrZ extends CommonBase {
         * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ in the success state.
         */
        public static Result_PendingHTLCInfoInboundHTLCErrZ ok(org.ldk.structs.PendingHTLCInfo o) {
-               long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PendingHTLCInfoInboundHTLCErrZ ret_hu_conv = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret);
@@ -57,13 +61,12 @@ public class Result_PendingHTLCInfoInboundHTLCErrZ extends CommonBase {
        /**
         * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ in the error state.
         */
-       public static Result_PendingHTLCInfoInboundHTLCErrZ err(short e_err_code_arg, byte[] e_err_data_arg, String e_msg_arg) {
-               long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_err(bindings.InboundHTLCErr_new(e_err_code_arg, e_err_data_arg, e_msg_arg));
-               Reference.reachabilityFence(e_err_code_arg);
-               Reference.reachabilityFence(e_err_data_arg);
-               Reference.reachabilityFence(e_msg_arg);
+       public static Result_PendingHTLCInfoInboundHTLCErrZ err(org.ldk.structs.InboundHTLCErr e) {
+               long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_err(e.ptr);
+               Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PendingHTLCInfoInboundHTLCErrZ ret_hu_conv = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
@@ -76,4 +79,22 @@ public class Result_PendingHTLCInfoInboundHTLCErrZ extends CommonBase {
                return ret;
        }
 
+       long clone_ptr() {
+               long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_PendingHTLCInfoInboundHTLCErrZ clone() {
+               long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_PendingHTLCInfoInboundHTLCErrZ ret_hu_conv = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }