@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;
}
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;
}