[Java] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / src / main / java / org / ldk / structs / Result_PositiveTimestampCreationErrorZ.java
index be43ee6f745a93aa3d51c0fff63778395dc0d6ab..d52ed2039b8ba129f2dcd40065d91ca4266e1655 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PositiveTimestampCreationErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PositiveTimestampCreationErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PositiveTimestampCreationErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PositiveTimestampCreationErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PositiveTimestampCreationErrorZ_is_ok(ptr)) {
                        return new Result_PositiveTimestampCreationErrorZ_OK(null, ptr);
@@ -25,8 +29,8 @@ public class Result_PositiveTimestampCreationErrorZ extends CommonBase {
                private Result_PositiveTimestampCreationErrorZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long res = bindings.CResult_PositiveTimestampCreationErrorZ_get_ok(ptr);
-                       PositiveTimestamp res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new PositiveTimestamp(null, res); }
-                       res_hu_conv.ptrs_to.add(this);
+                       org.ldk.structs.PositiveTimestamp res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.PositiveTimestamp(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
                        this.res = res_hu_conv;
                }
        }
@@ -42,11 +46,12 @@ public class Result_PositiveTimestampCreationErrorZ extends CommonBase {
        /**
         * Creates a new CResult_PositiveTimestampCreationErrorZ in the success state.
         */
-       public static Result_PositiveTimestampCreationErrorZ ok(PositiveTimestamp o) {
-               long ret = bindings.CResult_PositiveTimestampCreationErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+       public static Result_PositiveTimestampCreationErrorZ ok(org.ldk.structs.PositiveTimestamp o) {
+               long ret = bindings.CResult_PositiveTimestampCreationErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PositiveTimestampCreationErrorZ ret_hu_conv = Result_PositiveTimestampCreationErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
                return ret_hu_conv;
        }