Skip to content

Commit

Permalink
fix: Fix the JNI related function name of IRI
Browse files Browse the repository at this point in the history
Change the name from `hash` to `crypto` and use the correct method name.
The IRI can apply the dcurl library successfully now.
  • Loading branch information
marktwtn committed Apr 21, 2019
1 parent f10a018 commit b78fda7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions jni/iri-pearldiver-exlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
#include "../src/trinary.h"

JNIEXPORT jboolean JNICALL
Java_com_iota_iri_hash_PearlDiver_exlib_1init(JNIEnv *env, jclass clazz)
Java_com_iota_iri_crypto_PearlDiver_exlibInit(JNIEnv *env, jclass clazz)
{
if (!dcurl_init())
return JNI_FALSE;
return JNI_TRUE;
}

JNIEXPORT jboolean JNICALL
Java_com_iota_iri_hash_PearlDiver_exlib_1search(JNIEnv *env,
Java_com_iota_iri_crypto_PearlDiver_exlibSearch(JNIEnv *env,
jclass clazz,
jbyteArray trits,
jint mwm,
Expand Down Expand Up @@ -48,13 +48,13 @@ Java_com_iota_iri_hash_PearlDiver_exlib_1search(JNIEnv *env,
}

JNIEXPORT void JNICALL
Java_com_iota_iri_hash_PearlDiver_exlib_1cancel(JNIEnv *env, jclass clazz)
Java_com_iota_iri_crypto_PearlDiver_exlibCancel(JNIEnv *env, jclass clazz)
{
/* Do nothing */
}

JNIEXPORT void JNICALL
Java_com_iota_iri_hash_PearlDiver_exlib_1destroy(JNIEnv *env, jclass clazz)
Java_com_iota_iri_crypto_PearlDiver_exlibDestroy(JNIEnv *env, jclass clazz)
{
dcurl_destroy();
}
2 changes: 1 addition & 1 deletion mk/libdcurl.version
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CODEABI_1.0 {
ccurl_*;

/* JNI */
Java_com_iota_iri_hash_PearlDiver*;
Java_com_iota_iri_crypto_PearlDiver*;

local: *;
};
Expand Down

0 comments on commit b78fda7

Please sign in to comment.