From 4e6677716451d86dac58b61557cb53fc53ddb27b Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 5 Oct 2020 20:02:26 -0400 Subject: [PATCH] Fix java short type ID for pointers --- genbindings.py | 1 + src/main/jni/bindings.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/genbindings.py b/genbindings.py index 441c045e..07de75e8 100755 --- a/genbindings.py +++ b/genbindings.py @@ -122,6 +122,7 @@ with open(sys.argv[1]) as in_h, open(sys.argv[2], "w") as out_java, open(sys.arg is_ptr = True c_ty = "jlong" java_ty = "long" + fn_ty_arg = "J" var_is_arr = var_is_arr_regex.match(fn_arg) if var_is_arr is not None or ret_arr_len is not None: diff --git a/src/main/jni/bindings.c b/src/main/jni/bindings.c index d80311a7..b06a370f 100644 --- a/src/main/jni/bindings.c +++ b/src/main/jni/bindings.c @@ -1247,7 +1247,7 @@ static inline LDKSocketDescriptor LDKSocketDescriptor_init (JNIEnv * env, jclass assert(calls->send_data_meth != NULL); calls->disconnect_socket_meth = (*env)->GetMethodID(env, c, "disconnect_socket", "()V"); assert(calls->disconnect_socket_meth != NULL); - calls->eq_meth = (*env)->GetMethodID(env, c, "eq", "(V)Z"); + calls->eq_meth = (*env)->GetMethodID(env, c, "eq", "(J)Z"); assert(calls->eq_meth != NULL); calls->hash_meth = (*env)->GetMethodID(env, c, "hash", "()J"); assert(calls->hash_meth != NULL); -- 2.39.5