]> git.bitcoin.ninja Git - ldk-java/blobdiff - src/main/java/org/ldk/structs/ReplyChannelRange.java
Update to support None
[ldk-java] / src / main / java / org / ldk / structs / ReplyChannelRange.java
index a02c992b78eb24e182ab63de98121ef8477465ba..43ccf5d2a805b749ff57514ac7e292556c340aec 100644 (file)
@@ -11,56 +11,59 @@ public class ReplyChannelRange extends CommonBase {
        }
 
        public ReplyChannelRange(ReplyChannelRange orig) {
-               super(bindings.ReplyChannelRange_clone(orig.ptr & ~1));
+               super(bindings.ReplyChannelRange_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_chain_hash(ReplyChannelRange this_ptr) {
-               byte[] ret = bindings.ReplyChannelRange_get_chain_hash(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ReplyChannelRange_get_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_chain_hash(ReplyChannelRange this_ptr, byte[] val) {
-               bindings.ReplyChannelRange_set_chain_hash(this_ptr.ptr & ~1, val);
+               bindings.ReplyChannelRange_set_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_first_blocknum(ReplyChannelRange this_ptr) {
-               int ret = bindings.ReplyChannelRange_get_first_blocknum(this_ptr.ptr & ~1);
+               int ret = bindings.ReplyChannelRange_get_first_blocknum(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_first_blocknum(ReplyChannelRange this_ptr, int val) {
-               bindings.ReplyChannelRange_set_first_blocknum(this_ptr.ptr & ~1, val);
+               bindings.ReplyChannelRange_set_first_blocknum(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_number_of_blocks(ReplyChannelRange this_ptr) {
-               int ret = bindings.ReplyChannelRange_get_number_of_blocks(this_ptr.ptr & ~1);
+               int ret = bindings.ReplyChannelRange_get_number_of_blocks(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_number_of_blocks(ReplyChannelRange this_ptr, int val) {
-               bindings.ReplyChannelRange_set_number_of_blocks(this_ptr.ptr & ~1, val);
+               bindings.ReplyChannelRange_set_number_of_blocks(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public boolean get_full_information(ReplyChannelRange this_ptr) {
-               boolean ret = bindings.ReplyChannelRange_get_full_information(this_ptr.ptr & ~1);
+               boolean ret = bindings.ReplyChannelRange_get_full_information(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_full_information(ReplyChannelRange this_ptr, boolean val) {
-               bindings.ReplyChannelRange_set_full_information(this_ptr.ptr & ~1, val);
+               bindings.ReplyChannelRange_set_full_information(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        // Skipped ReplyChannelRange_set_short_channel_ids
        // Skipped ReplyChannelRange_new
-       // Skipped ReplyChannelRange_read
+       public ReplyChannelRange(byte[] ser) {
+               super(bindings.ReplyChannelRange_read(ser));
+       }
+
        // Skipped ReplyChannelRange_write
 }