[Java] Update auto-generated bindings to 0.0.115
[ldk-java] / src / main / java / org / ldk / structs / Option_EventZ.java
index b1516c87e7bf4ef0adef7992e37884083489c176..4d28ec922afa6059120b6f4b077b5134239c172c 100644 (file)
@@ -9,7 +9,7 @@ import javax.annotation.Nullable;
 
 
 /**
- * An enum which can either contain a crate::lightning::util::events::Event or not
+ * An enum which can either contain a crate::lightning::events::Event or not
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class Option_EventZ extends CommonBase {
@@ -31,7 +31,7 @@ public class Option_EventZ extends CommonBase {
        }
 
        /**
-        * When we're in this state, this COption_EventZ contains a crate::lightning::util::events::Event
+        * When we're in this state, this COption_EventZ contains a crate::lightning::events::Event
         */
        public final static class Some extends Option_EventZ {
                public final org.ldk.structs.Event some;
@@ -39,7 +39,7 @@ public class Option_EventZ extends CommonBase {
                        super(null, ptr);
                        long some = obj.some;
                        org.ldk.structs.Event some_hu_conv = org.ldk.structs.Event.constr_from_ptr(some);
-                       some_hu_conv.ptrs_to.add(this);
+                       if (some_hu_conv != null) { some_hu_conv.ptrs_to.add(this); };
                        this.some = some_hu_conv;
                }
        }
@@ -52,14 +52,15 @@ public class Option_EventZ extends CommonBase {
                }
        }
        /**
-        * Constructs a new COption_EventZ containing a crate::lightning::util::events::Event
+        * Constructs a new COption_EventZ containing a crate::lightning::events::Event
         */
-       public static Option_EventZ some(Event o) {
+       public static Option_EventZ some(org.ldk.structs.Event o) {
                long ret = bindings.COption_EventZ_some(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_EventZ ret_hu_conv = org.ldk.structs.Option_EventZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
                return ret_hu_conv;
        }
 
@@ -70,7 +71,7 @@ public class Option_EventZ extends CommonBase {
                long ret = bindings.COption_EventZ_none();
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_EventZ ret_hu_conv = org.ldk.structs.Option_EventZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
                return ret_hu_conv;
        }
 
@@ -89,7 +90,7 @@ public class Option_EventZ extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_EventZ ret_hu_conv = org.ldk.structs.Option_EventZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }