Update auto-generated bindings with new upstream.
[ldk-java] / src / main / java / org / ldk / structs / RoutingFees.java
index a182fea63cb4768f618bb3464eb44d18c26ba26d..da1c5c48000790507505b2d2dc6599c037313df4 100644 (file)
@@ -11,14 +11,7 @@ public class RoutingFees extends CommonBase {
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
                super.finalize();
-               bindings.RoutingFees_free(ptr);
-       }
-
-       public static RoutingFees constructor_clone(RoutingFees orig) {
-               long ret = bindings.RoutingFees_clone(orig == null ? 0 : orig.ptr & ~1);
-               RoutingFees ret_hu_conv = new RoutingFees(null, ret);
-               ret_hu_conv.ptrs_to.add(orig);
-               return ret_hu_conv;
+               if (ptr != 0) { bindings.RoutingFees_free(ptr); }
        }
 
        public int get_base_msat() {
@@ -42,18 +35,25 @@ 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) {
-               long ret = bindings.RoutingFees_read(ser);
+       public RoutingFees clone() {
+               long ret = bindings.RoutingFees_clone(this.ptr);
                RoutingFees ret_hu_conv = new RoutingFees(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static Result_RoutingFeesDecodeErrorZ constructor_read(byte[] ser) {
+               long ret = bindings.RoutingFees_read(ser);
+               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;
        }