Update auto-generated bindings with new upstream.
[ldk-java] / src / main / java / org / ldk / structs / OutPoint.java
index 12fffe1640066d52d07b20d2df1f39f31006f84e..d0c7edba75ad06e959af96172d93291a5b5140c8 100644 (file)
@@ -2,44 +2,48 @@ package org.ldk.structs;
 
 import org.ldk.impl.bindings;
 import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
 
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class OutPoint extends CommonBase {
        OutPoint(Object _dummy, long ptr) { super(ptr); }
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
                super.finalize();
-               bindings.OutPoint_free(ptr);
+               if (ptr != 0) { bindings.OutPoint_free(ptr); }
        }
 
-       public OutPoint(OutPoint orig) {
-               super(bindings.OutPoint_clone(orig == null ? 0 : orig.ptr & ~1));
-               this.ptrs_to.add(orig);
-       }
-
-       public byte[] get_txid(OutPoint this_ptr) {
-               byte[] ret = bindings.OutPoint_get_txid(this_ptr == null ? 0 : this_ptr.ptr & ~1);
-               this.ptrs_to.add(this_ptr);
+       public byte[] get_txid() {
+               byte[] ret = bindings.OutPoint_get_txid(this.ptr);
                return ret;
        }
 
-       public void set_txid(OutPoint this_ptr, byte[] val) {
-               bindings.OutPoint_set_txid(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
-               this.ptrs_to.add(this_ptr);
+       public void set_txid(byte[] val) {
+               bindings.OutPoint_set_txid(this.ptr, val);
        }
 
-       public short get_index(OutPoint this_ptr) {
-               short ret = bindings.OutPoint_get_index(this_ptr == null ? 0 : this_ptr.ptr & ~1);
-               this.ptrs_to.add(this_ptr);
+       public short get_index() {
+               short ret = bindings.OutPoint_get_index(this.ptr);
                return ret;
        }
 
-       public void set_index(OutPoint this_ptr, short val) {
-               bindings.OutPoint_set_index(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
-               this.ptrs_to.add(this_ptr);
+       public void set_index(short val) {
+               bindings.OutPoint_set_index(this.ptr, val);
+       }
+
+       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(byte[] txid_arg, short index_arg) {
-               super(bindings.OutPoint_new(txid_arg, index_arg));
+       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;
        }
 
        public byte[] to_channel_id() {
@@ -47,9 +51,15 @@ public class OutPoint extends CommonBase {
                return ret;
        }
 
-       // Skipped OutPoint_write
-       public OutPoint(byte[] ser) {
-               super(bindings.OutPoint_read(ser));
+       public byte[] write() {
+               byte[] ret = bindings.OutPoint_write(this.ptr);
+               return ret;
+       }
+
+       public static Result_OutPointDecodeErrorZ constructor_read(byte[] ser) {
+               long ret = bindings.OutPoint_read(ser);
+               Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
        }
 
 }