X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FReplyChannelRange.java;h=ca7243da6d12c8dc9b79060a09563fbcc1d9cabd;hb=fed2245c60159f6c074c9ed5c0f3ce273ad9841b;hp=939620ba32e8ca23362107a3b968c2140e8acaf8;hpb=110f2f104ba8fc34caa7e34e04737f36f064b050;p=ldk-java diff --git a/src/main/java/org/ldk/structs/ReplyChannelRange.java b/src/main/java/org/ldk/structs/ReplyChannelRange.java index 939620ba..ca7243da 100644 --- a/src/main/java/org/ldk/structs/ReplyChannelRange.java +++ b/src/main/java/org/ldk/structs/ReplyChannelRange.java @@ -11,13 +11,13 @@ public class ReplyChannelRange extends CommonBase { @Override @SuppressWarnings("deprecation") protected void finalize() throws Throwable { super.finalize(); - bindings.ReplyChannelRange_free(ptr); + if (ptr != 0) { bindings.ReplyChannelRange_free(ptr); } } - public static ReplyChannelRange constructor_clone(ReplyChannelRange orig) { - long ret = bindings.ReplyChannelRange_clone(orig == null ? 0 : orig.ptr & ~1); + public ReplyChannelRange clone() { + long ret = bindings.ReplyChannelRange_clone(this.ptr); ReplyChannelRange ret_hu_conv = new ReplyChannelRange(null, ret); - ret_hu_conv.ptrs_to.add(orig); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -64,18 +64,18 @@ public class ReplyChannelRange extends CommonBase { public static ReplyChannelRange constructor_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg, boolean full_information_arg, long[] short_channel_ids_arg) { long ret = bindings.ReplyChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg, full_information_arg, short_channel_ids_arg); ReplyChannelRange ret_hu_conv = new ReplyChannelRange(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } - public static ReplyChannelRange constructor_read(byte[] ser) { + public static Result_ReplyChannelRangeDecodeErrorZ constructor_read(byte[] ser) { long ret = bindings.ReplyChannelRange_read(ser); - ReplyChannelRange ret_hu_conv = new ReplyChannelRange(null, ret); + Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } - public byte[] write(ReplyChannelRange obj) { - byte[] ret = bindings.ReplyChannelRange_write(obj == null ? 0 : obj.ptr & ~1); - this.ptrs_to.add(obj); + public byte[] write() { + byte[] ret = bindings.ReplyChannelRange_write(this.ptr); return ret; }