@Override @SuppressWarnings("deprecation")
protected void finalize() throws Throwable {
super.finalize();
- bindings.UpdateFulfillHTLC_free(ptr);
+ if (ptr != 0) { bindings.UpdateFulfillHTLC_free(ptr); }
}
- public static UpdateFulfillHTLC constructor_clone(UpdateFulfillHTLC orig) {
- long ret = bindings.UpdateFulfillHTLC_clone(orig == null ? 0 : orig.ptr & ~1);
+ public UpdateFulfillHTLC clone() {
+ long ret = bindings.UpdateFulfillHTLC_clone(this.ptr);
UpdateFulfillHTLC ret_hu_conv = new UpdateFulfillHTLC(null, ret);
- ret_hu_conv.ptrs_to.add(orig);
+ ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
}
public static UpdateFulfillHTLC constructor_new(byte[] channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg) {
long ret = bindings.UpdateFulfillHTLC_new(channel_id_arg, htlc_id_arg, payment_preimage_arg);
UpdateFulfillHTLC ret_hu_conv = new UpdateFulfillHTLC(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
- public byte[] write(UpdateFulfillHTLC obj) {
- byte[] ret = bindings.UpdateFulfillHTLC_write(obj == null ? 0 : obj.ptr & ~1);
- this.ptrs_to.add(obj);
+ public byte[] write() {
+ byte[] ret = bindings.UpdateFulfillHTLC_write(this.ptr);
return ret;
}
public static UpdateFulfillHTLC constructor_read(byte[] ser) {
long ret = bindings.UpdateFulfillHTLC_read(ser);
UpdateFulfillHTLC ret_hu_conv = new UpdateFulfillHTLC(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}