]> git.bitcoin.ninja Git - ldk-java/commitdiff
Handle the new LDKTwelveBytes instead of LDKTenBytes
authorMatt Corallo <git@bluematt.me>
Mon, 20 Dec 2021 07:06:04 +0000 (07:06 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 21 Dec 2021 01:07:18 +0000 (01:07 +0000)
genbindings.py

index 640400ee3384e0a6e9673084786dc1763027edae..6c1762b1624b76f53998e45edfa55628a85d09e2 100755 (executable)
@@ -174,10 +174,10 @@ def java_c_types(fn_arg, ret_arr_len):
         assert var_is_arr_regex.match(fn_arg[8:])
         rust_obj = "LDKTwentyBytes"
         arr_access = "data"
-    elif fn_arg.startswith("LDKTenBytes"):
-        fn_arg = "uint8_t (*" + fn_arg[12:] + ")[10]"
+    elif fn_arg.startswith("LDKTwelveBytes"):
+        fn_arg = "uint8_t (*" + fn_arg[15:] + ")[12]"
         assert var_is_arr_regex.match(fn_arg[8:])
-        rust_obj = "LDKTenBytes"
+        rust_obj = "LDKTwelveBytes"
         arr_access = "data"
     elif fn_arg.startswith("LDKu8slice"):
         fn_arg = "uint8_t (*" + fn_arg[11:] + ")[datalen]"