X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FUpdateFee.java;h=a939f3f18021f9971a109503dbb0b67f3c861c03;hb=fed2245c60159f6c074c9ed5c0f3ce273ad9841b;hp=77f14f6cb9ff38fa27b8433380915fdccaa91eed;hpb=110f2f104ba8fc34caa7e34e04737f36f064b050;p=ldk-java diff --git a/src/main/java/org/ldk/structs/UpdateFee.java b/src/main/java/org/ldk/structs/UpdateFee.java index 77f14f6c..a939f3f1 100644 --- a/src/main/java/org/ldk/structs/UpdateFee.java +++ b/src/main/java/org/ldk/structs/UpdateFee.java @@ -11,13 +11,13 @@ public class UpdateFee extends CommonBase { @Override @SuppressWarnings("deprecation") protected void finalize() throws Throwable { super.finalize(); - bindings.UpdateFee_free(ptr); + if (ptr != 0) { bindings.UpdateFee_free(ptr); } } - public static UpdateFee constructor_clone(UpdateFee orig) { - long ret = bindings.UpdateFee_clone(orig == null ? 0 : orig.ptr & ~1); + public UpdateFee clone() { + long ret = bindings.UpdateFee_clone(this.ptr); UpdateFee ret_hu_conv = new UpdateFee(null, ret); - ret_hu_conv.ptrs_to.add(orig); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -42,18 +42,19 @@ public class UpdateFee extends CommonBase { public static UpdateFee constructor_new(byte[] channel_id_arg, int feerate_per_kw_arg) { long ret = bindings.UpdateFee_new(channel_id_arg, feerate_per_kw_arg); UpdateFee ret_hu_conv = new UpdateFee(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } - public byte[] write(UpdateFee obj) { - byte[] ret = bindings.UpdateFee_write(obj == null ? 0 : obj.ptr & ~1); - this.ptrs_to.add(obj); + public byte[] write() { + byte[] ret = bindings.UpdateFee_write(this.ptr); return ret; } public static UpdateFee constructor_read(byte[] ser) { long ret = bindings.UpdateFee_read(ser); UpdateFee ret_hu_conv = new UpdateFee(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; }