Update auto-generated bindings with new upstream.
[ldk-java] / src / main / java / org / ldk / structs / OutPoint.java
index 0d9085c92d579dac598978d9995a5a088c30b888..d0c7edba75ad06e959af96172d93291a5b5140c8 100644 (file)
@@ -11,14 +11,7 @@ public class OutPoint extends CommonBase {
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
                super.finalize();
-               bindings.OutPoint_free(ptr);
-       }
-
-       public static OutPoint constructor_clone(OutPoint orig) {
-               long ret = bindings.OutPoint_clone(orig == null ? 0 : orig.ptr & ~1);
-               OutPoint ret_hu_conv = new OutPoint(null, ret);
-               ret_hu_conv.ptrs_to.add(orig);
-               return ret_hu_conv;
+               if (ptr != 0) { bindings.OutPoint_free(ptr); }
        }
 
        public byte[] get_txid() {
@@ -42,6 +35,14 @@ public class OutPoint extends CommonBase {
        public static OutPoint constructor_new(byte[] txid_arg, short index_arg) {
                long ret = bindings.OutPoint_new(txid_arg, index_arg);
                OutPoint ret_hu_conv = new OutPoint(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public OutPoint clone() {
+               long ret = bindings.OutPoint_clone(this.ptr);
+               OutPoint ret_hu_conv = new OutPoint(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
@@ -50,15 +51,14 @@ public class OutPoint extends CommonBase {
                return ret;
        }
 
-       public byte[] write(OutPoint obj) {
-               byte[] ret = bindings.OutPoint_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.OutPoint_write(this.ptr);
                return ret;
        }
 
-       public static OutPoint constructor_read(byte[] ser) {
+       public static Result_OutPointDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.OutPoint_read(ser);
-               OutPoint ret_hu_conv = new OutPoint(null, ret);
+               Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }