X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FRoutingFees.java;h=c11990a3a3bb6e776ea7531995fc634d6d55a7df;hb=b52dde859c138f9257499496749d1eb89f9f6f43;hp=a182fea63cb4768f618bb3464eb44d18c26ba26d;hpb=110f2f104ba8fc34caa7e34e04737f36f064b050;p=ldk-java diff --git a/src/main/java/org/ldk/structs/RoutingFees.java b/src/main/java/org/ldk/structs/RoutingFees.java index a182fea6..c11990a3 100644 --- a/src/main/java/org/ldk/structs/RoutingFees.java +++ b/src/main/java/org/ldk/structs/RoutingFees.java @@ -11,13 +11,13 @@ public class RoutingFees extends CommonBase { @Override @SuppressWarnings("deprecation") protected void finalize() throws Throwable { super.finalize(); - bindings.RoutingFees_free(ptr); + if (ptr != 0) { bindings.RoutingFees_free(ptr); } } - public static RoutingFees constructor_clone(RoutingFees orig) { - long ret = bindings.RoutingFees_clone(orig == null ? 0 : orig.ptr & ~1); + public RoutingFees clone() { + long ret = bindings.RoutingFees_clone(this.ptr); RoutingFees ret_hu_conv = new RoutingFees(null, ret); - ret_hu_conv.ptrs_to.add(orig); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -42,18 +42,18 @@ public class RoutingFees extends CommonBase { public static RoutingFees constructor_new(int base_msat_arg, int proportional_millionths_arg) { long ret = bindings.RoutingFees_new(base_msat_arg, proportional_millionths_arg); RoutingFees ret_hu_conv = new RoutingFees(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } - public static RoutingFees constructor_read(byte[] ser) { + public static Result_RoutingFeesDecodeErrorZ constructor_read(byte[] ser) { long ret = bindings.RoutingFees_read(ser); - RoutingFees ret_hu_conv = new RoutingFees(null, ret); + Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } - public byte[] write(RoutingFees obj) { - byte[] ret = bindings.RoutingFees_write(obj == null ? 0 : obj.ptr & ~1); - this.ptrs_to.add(obj); + public byte[] write() { + byte[] ret = bindings.RoutingFees_write(this.ptr); return ret; }