]> git.bitcoin.ninja Git - ldk-java/commitdiff
Treat Txid as an alias for LDKThirtyTwoBytes
authorMatt Corallo <git@bluematt.me>
Tue, 23 Mar 2021 00:48:41 +0000 (20:48 -0400)
committerMatt Corallo <git@bluematt.me>
Fri, 16 Apr 2021 00:42:53 +0000 (00:42 +0000)
genbindings.py

index 12649658afe476ce32405a95c0d44f139f931cda..b1f4a5eb60c8395af74ab41ba0cb5328e8216b9e 100755 (executable)
@@ -101,6 +101,11 @@ def java_c_types(fn_arg, ret_arr_len):
         assert var_is_arr_regex.match(fn_arg[8:])
         rust_obj = "LDKThirtyTwoBytes"
         arr_access = "data"
+    elif fn_arg.startswith("LDKTxid"):
+        fn_arg = "uint8_t (*" + fn_arg[8:] + ")[32]"
+        assert var_is_arr_regex.match(fn_arg[8:])
+        rust_obj = "LDKThirtyTwoBytes"
+        arr_access = "data"
     elif fn_arg.startswith("LDKPublicKey"):
         fn_arg = "uint8_t (*" + fn_arg[13:] + ")[33]"
         assert var_is_arr_regex.match(fn_arg[8:])