Update auto-generated bindings with new upstream.
[ldk-java] / src / main / java / org / ldk / structs / Pong.java
index d44e6bc4a0cf3e85bce25c718dcbbeb28ce06dc2..80530aa7d5342ffc9bd25e2c4b499d588ab17acd 100644 (file)
@@ -14,13 +14,6 @@ public class Pong extends CommonBase {
                if (ptr != 0) { bindings.Pong_free(ptr); }
        }
 
-       public static Pong constructor_clone(Pong orig) {
-               long ret = bindings.Pong_clone(orig == null ? 0 : orig.ptr & ~1);
-               Pong ret_hu_conv = new Pong(null, ret);
-               ret_hu_conv.ptrs_to.add(orig);
-               return ret_hu_conv;
-       }
-
        public short get_byteslen() {
                short ret = bindings.Pong_get_byteslen(this.ptr);
                return ret;
@@ -33,6 +26,14 @@ public class Pong extends CommonBase {
        public static Pong constructor_new(short byteslen_arg) {
                long ret = bindings.Pong_new(byteslen_arg);
                Pong ret_hu_conv = new Pong(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public Pong clone() {
+               long ret = bindings.Pong_clone(this.ptr);
+               Pong ret_hu_conv = new Pong(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
@@ -41,9 +42,9 @@ public class Pong extends CommonBase {
                return ret;
        }
 
-       public static Pong constructor_read(byte[] ser) {
+       public static Result_PongDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.Pong_read(ser);
-               Pong ret_hu_conv = new Pong(null, ret);
+               Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }