Work around our stupid hack with a stupid hack (see XXX in genbindings.py)
[ldk-java] / ts / structs / Result_InMemoryChannelKeysDecodeErrorZ.ts
index 0dde403d0ccf5160f32c78ac20a9247bad899f52..0d03fd66e3e6b4ddc2625bfc7779b4c6dd5f636a 100644 (file)
@@ -19,8 +19,9 @@ public class Result_InMemoryChannelKeysDecodeErrorZ extends CommonBase {
                public final InMemoryChannelKeys res;
                private Result_InMemoryChannelKeysDecodeErrorZ_OK(Object _dummy, long ptr) {
                        super(_dummy, ptr);
-                       uint32_t res = bindings.LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok(ptr);
-                       InMemoryChannelKeys res_hu_conv = new InMemoryChannelKeys(null, res);
+                       number res = bindings.LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: InMemoryChannelKeys = new InMemoryChannelKeys(null, res);
+                       res_hu_conv.ptrs_to.add(this);
                        this.res = res_hu_conv;
                }
                public Result_InMemoryChannelKeysDecodeErrorZ_OK(InMemoryChannelKeys res) {
@@ -33,8 +34,9 @@ public class Result_InMemoryChannelKeysDecodeErrorZ extends CommonBase {
                public final DecodeError err;
                private Result_InMemoryChannelKeysDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
-                       uint32_t err = bindings.LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err(ptr);
-                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       number err = bindings.LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
                public Result_InMemoryChannelKeysDecodeErrorZ_Err(DecodeError err) {