From: Matt Corallo Date: Mon, 25 Jan 2021 22:45:22 +0000 (-0500) Subject: Handle uintptr_t slightly better in C conversion X-Git-Tag: v0.0.1~36^2~6 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=37e5ae059926cd54d7c5aac06a5eef6785662f94;p=ldk-java Handle uintptr_t slightly better in C conversion --- diff --git a/genbindings.py b/genbindings.py index f47cce36..32cad50a 100755 --- a/genbindings.py +++ b/genbindings.py @@ -216,11 +216,12 @@ def java_c_types(fn_arg, ret_arr_len): # TODO: uintptr_t is arch-dependent :( mapped_type = consts.c_type_map['uint64_t'] java_ty = mapped_type[0] - c_ty = "int64_t" fn_ty_arg = "J" if fn_arg.startswith("uint64_t"): + c_ty = "int64_t" fn_arg = fn_arg[8:].strip() else: + c_ty = "intptr_t" fn_arg = fn_arg[9:].strip() is_primitive = True elif is_const and fn_arg.startswith("char *"):