From: Matt Corallo Date: Mon, 17 Jan 2022 02:50:23 +0000 (+0000) Subject: Use intptr_t in C when talking about a pointer. X-Git-Tag: v0.0.105.0~5^2~5 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=b0ba503b308bcdcbf1b7609876705c12408e44e6;p=ldk-java Use intptr_t in C when talking about a pointer. This fixes a bug in TS where we'd return an int64_t when we intended to return a pointer, confusing JavaScript as to why it has a bigint instead of a number. This may make it harder to support 32-bit Java platforms in the future if we have a reason to do so, but that seems unlikely and its possible we can simply redefine the type. --- diff --git a/genbindings.py b/genbindings.py index 8b067f72..175340d6 100755 --- a/genbindings.py +++ b/genbindings.py @@ -288,7 +288,7 @@ def java_c_types(fn_arg, ret_arr_len): fn_arg = fn_arg[8:].strip() else: java_ty = consts.ptr_native_ty - c_ty = "int64_t" + c_ty = "intptr_t" arr_ty = "uintptr_t" rust_obj = "uintptr_t" fn_arg = fn_arg[9:].strip()