Update auto-generated bindings to latest upstream
[ldk-java] / src / main / java / org / ldk / structs / Result_TrustedCommitmentTransactionNoneZ.java
index 7c00f3a00f08981d2160bcdb298d7e5e4811af18..68be3d9e6cc13d9c05c68911698b24b33db66ee2 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_TrustedCommitmentTransactionNoneZ extends CommonBase {
        private Result_TrustedCommitmentTransactionNoneZ(Object _dummy, long ptr) { super(ptr); }
@@ -40,6 +41,7 @@ public class Result_TrustedCommitmentTransactionNoneZ extends CommonBase {
         */
        public static Result_TrustedCommitmentTransactionNoneZ ok(TrustedCommitmentTransaction o) {
                long ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(o == null ? 0 : o.ptr & ~1);
+               if (ret < 1024) { return null; }
                Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(o);
                // Due to rust's strict-ownership memory model, in some cases we need to "move"
@@ -58,6 +60,7 @@ public class Result_TrustedCommitmentTransactionNoneZ extends CommonBase {
         */
        public static Result_TrustedCommitmentTransactionNoneZ err() {
                long ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_err();
+               if (ret < 1024) { return null; }
                Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }