Update to support None
[ldk-java] / src / main / java / org / ldk / structs / ChannelInfo.java
index e92dc7eb4541e071f123bccb58bc7ef64e5411d7..67537203842af2cf7dfcd5b5769a7a35d1e34ccf 100644 (file)
@@ -11,71 +11,71 @@ public class ChannelInfo extends CommonBase {
        }
 
        public ChannelFeatures get_features(ChannelInfo this_ptr) {
-               ChannelFeatures ret = new ChannelFeatures(null, bindings.ChannelInfo_get_features(this_ptr.ptr & ~1));
+               ChannelFeatures ret = new ChannelFeatures(null, bindings.ChannelInfo_get_features(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_features(ChannelInfo this_ptr, ChannelFeatures val) {
-               bindings.ChannelInfo_set_features(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.ChannelInfo_set_features(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public byte[] get_node_one(ChannelInfo this_ptr) {
-               byte[] ret = bindings.ChannelInfo_get_node_one(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ChannelInfo_get_node_one(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_node_one(ChannelInfo this_ptr, byte[] val) {
-               bindings.ChannelInfo_set_node_one(this_ptr.ptr & ~1, val);
+               bindings.ChannelInfo_set_node_one(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public DirectionalChannelInfo get_one_to_two(ChannelInfo this_ptr) {
-               DirectionalChannelInfo ret = new DirectionalChannelInfo(null, bindings.ChannelInfo_get_one_to_two(this_ptr.ptr & ~1));
+               DirectionalChannelInfo ret = new DirectionalChannelInfo(null, bindings.ChannelInfo_get_one_to_two(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_one_to_two(ChannelInfo this_ptr, DirectionalChannelInfo val) {
-               bindings.ChannelInfo_set_one_to_two(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.ChannelInfo_set_one_to_two(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public byte[] get_node_two(ChannelInfo this_ptr) {
-               byte[] ret = bindings.ChannelInfo_get_node_two(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ChannelInfo_get_node_two(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_node_two(ChannelInfo this_ptr, byte[] val) {
-               bindings.ChannelInfo_set_node_two(this_ptr.ptr & ~1, val);
+               bindings.ChannelInfo_set_node_two(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public DirectionalChannelInfo get_two_to_one(ChannelInfo this_ptr) {
-               DirectionalChannelInfo ret = new DirectionalChannelInfo(null, bindings.ChannelInfo_get_two_to_one(this_ptr.ptr & ~1));
+               DirectionalChannelInfo ret = new DirectionalChannelInfo(null, bindings.ChannelInfo_get_two_to_one(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_two_to_one(ChannelInfo this_ptr, DirectionalChannelInfo val) {
-               bindings.ChannelInfo_set_two_to_one(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.ChannelInfo_set_two_to_one(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public ChannelAnnouncement get_announcement_message(ChannelInfo this_ptr) {
-               ChannelAnnouncement ret = new ChannelAnnouncement(null, bindings.ChannelInfo_get_announcement_message(this_ptr.ptr & ~1));
+               ChannelAnnouncement ret = new ChannelAnnouncement(null, bindings.ChannelInfo_get_announcement_message(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_announcement_message(ChannelInfo this_ptr, ChannelAnnouncement val) {
-               bindings.ChannelInfo_set_announcement_message(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.ChannelInfo_set_announcement_message(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }