Properly set CVec_u8Z to a byte[] which adds a ton more fn's
[ldk-java] / src / main / java / org / ldk / structs / Init.java
index 491e692ac0b6d73ba4721d53e30fb0436cad0ca1..3c998bd972e025d8c22fda76e8505ba2bf3333e1 100644 (file)
@@ -16,7 +16,12 @@ public class Init extends CommonBase {
                this.ptrs_to.add(orig);
        }
 
-       // Skipped Init_write
+       public byte[] write(Init obj) {
+               byte[] ret = bindings.Init_write(obj == null ? 0 : obj.ptr & ~1);
+               this.ptrs_to.add(obj);
+               return ret;
+       }
+
        public Init(byte[] ser) {
                super(bindings.Init_read(ser));
        }