[TS] Handle from-hu string array conversions
authorMatt Corallo <git@bluematt.me>
Fri, 6 Oct 2023 17:53:30 +0000 (17:53 +0000)
committerMatt Corallo <git@bluematt.me>
Sat, 7 Oct 2023 17:23:07 +0000 (17:23 +0000)
typescript_strings.py

index 92c734ac0f1eb912b8ca4087a884e7ca9e0aa4e7..3dd8d53b3b56d6741ba3545b7e1f9bd2503fafd0 100644 (file)
@@ -857,12 +857,10 @@ import * as bindings from '../bindings.mjs'
             return ("bindings.encodeUint8Array(" + inner + ")", "")
         elif mapped_ty.c_ty == "uint16_t" or mapped_ty.c_ty == "int16_t":
             return ("bindings.encodeUint16Array(" + inner + ")", "")
-        elif mapped_ty.c_ty == "uint32_t":
+        elif mapped_ty.c_ty == "uint32_t" or mapped_ty.rust_obj == "LDKStr":
             return ("bindings.encodeUint32Array(" + inner + ")", "")
         elif mapped_ty.c_ty == "int64_t" or mapped_ty.c_ty == "uint64_t":
             return ("bindings.encodeUint64Array(" + inner + ")", "")
-        elif mapped_ty.rust_obj == "LDKStr":
-            return ("XXX-unused", "")
         else:
             print(mapped_ty.c_ty)
             assert False