From 37e5ae059926cd54d7c5aac06a5eef6785662f94 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 25 Jan 2021 17:45:22 -0500 Subject: [PATCH] Handle uintptr_t slightly better in C conversion --- genbindings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 *"): -- 2.39.5