Created
April 25, 2014 16:37
-
-
Save TTimo/11295621 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: jni/native.c | |
=================================================================== | |
--- jni/native.c (revision 2) | |
+++ jni/native.c (working copy) | |
@@ -5,7 +5,7 @@ | |
#define DEBUG_TAG "NDK_AndroidNDK1SampleActivity" | |
-void Java_com_mamlambo_sample_ndk1_AndroidNDK1SampleActivity_helloLog(JNIEnv * env, jobject this, jstring logThis) | |
+JNIEXPORT void JNICALL Java_com_mamlambo_sample_ndk1_AndroidNDK1SampleActivity_helloLog(JNIEnv * env, jobject this, jstring logThis) | |
{ | |
jboolean isCopy; | |
const char * szLogThis = (*env)->GetStringUTFChars(env, logThis, &isCopy); | |
@@ -15,7 +15,7 @@ | |
(*env)->ReleaseStringUTFChars(env, logThis, szLogThis); | |
} | |
-jstring Java_com_mamlambo_sample_ndk1_AndroidNDK1SampleActivity_getString(JNIEnv * env, jobject this, jint value1, jint value2) | |
+JNIEXPORT jstring JNICALL Java_com_mamlambo_sample_ndk1_AndroidNDK1SampleActivity_getString(JNIEnv * env, jobject this, jint value1, jint value2) | |
{ | |
char *szFormat = "The sum of the two numbers is: %i"; | |
char *szResult; | |
@@ -36,4 +36,4 @@ | |
free(szResult); | |
return result; | |
-} | |
\ No newline at end of file | |
+} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment