Update auto-generated bindings to 0.0.103
[ldk-java] / src / main / java / org / ldk / structs / Result_DescriptionCreationErrorZ.java
index 476b8d7a11f9ed73ceffddefdf517a9a98ba450a..aa751e7ad3f081b264121f8a9a9219ee9065363a 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_DescriptionCreationErrorZ extends CommonBase {
        private Result_DescriptionCreationErrorZ(Object _dummy, long ptr) { super(ptr); }
@@ -23,7 +24,7 @@ public class Result_DescriptionCreationErrorZ extends CommonBase {
                private Result_DescriptionCreationErrorZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long res = bindings.LDKCResult_DescriptionCreationErrorZ_get_ok(ptr);
-                       Description res_hu_conv = new Description(null, res);
+                       Description res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new Description(null, res); }
                        res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
@@ -42,16 +43,17 @@ public class Result_DescriptionCreationErrorZ extends CommonBase {
         */
        public static Result_DescriptionCreationErrorZ ok(Description o) {
                long ret = bindings.CResult_DescriptionCreationErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+               if (ret >= 0 && ret <= 4096) { return null; }
                Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(o);
                return ret_hu_conv;
        }
 
        /**
         * Creates a new CResult_DescriptionCreationErrorZ in the error state.
         */
-       public static Result_DescriptionCreationErrorZ err(CreationError e) {
+       public static Result_DescriptionCreationErrorZ err(org.ldk.enums.CreationError e) {
                long ret = bindings.CResult_DescriptionCreationErrorZ_err(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
                Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
@@ -62,6 +64,7 @@ public class Result_DescriptionCreationErrorZ extends CommonBase {
         */
        public Result_DescriptionCreationErrorZ clone() {
                long ret = bindings.CResult_DescriptionCreationErrorZ_clone(this.ptr);
+               if (ret >= 0 && ret <= 4096) { return null; }
                Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }