Skip to content

Commit b0ba503

Browse files
committed
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.
1 parent ad349e9 commit b0ba503

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

genbindings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def java_c_types(fn_arg, ret_arr_len):
288288
fn_arg = fn_arg[8:].strip()
289289
else:
290290
java_ty = consts.ptr_native_ty
291-
c_ty = "int64_t"
291+
c_ty = "intptr_t"
292292
arr_ty = "uintptr_t"
293293
rust_obj = "uintptr_t"
294294
fn_arg = fn_arg[9:].strip()

0 commit comments

Comments
 (0)