From: Matt Corallo Date: Tue, 6 Oct 2020 00:02:26 +0000 (-0400) Subject: Fix java short type ID for pointers X-Git-Tag: v0.0.1~140 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=4e6677716451d86dac58b61557cb53fc53ddb27b;p=ldk-java Fix java short type ID for pointers --- 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);