Fix write method generation w/ upstream changes
[ldk-java] / src / main / java / org / ldk / structs / RoutingFees.java
index a182fea63cb4768f618bb3464eb44d18c26ba26d..0671b5456c61ff5b9807ce2ccc405267b5142011 100644 (file)
@@ -11,7 +11,7 @@ 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) {
@@ -51,9 +51,8 @@ public class RoutingFees extends CommonBase {
                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;
        }