Skip to content

Commit 4973f8b

Browse files
committed
Changed webview pyjnius patch function names
1 parent 17e6f45 commit 4973f8b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pythonforandroid/bootstraps/webview/build/jni/src/pyjniusjni.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#include "android/log.h"
99

10-
/* These JNI management functions are taken from SDL2 */
10+
/* These JNI management functions are taken from SDL2, but modified to refer to pyjnius */
1111

1212
/* #define LOG(n, x) __android_log_write(ANDROID_LOG_INFO, (n), (x)) */
1313
/* #define LOGP(x) LOG("python", (x)) */
@@ -45,7 +45,7 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved)
4545
*/
4646
if (pthread_key_create(&mThreadKey, Android_JNI_ThreadDestroyed) != 0) {
4747

48-
__android_log_print(ANDROID_LOG_ERROR, "SDL", "Error initializing pthread key");
48+
__android_log_print(ANDROID_LOG_ERROR, "pyjniusjni", "Error initializing pthread key");
4949
}
5050
Android_JNI_SetupThread();
5151

@@ -97,7 +97,7 @@ static void Android_JNI_ThreadDestroyed(void* value)
9797
}
9898
}
9999

100-
void *SDL_AndroidGetJNIEnv()
100+
void *WebView_AndroidGetJNIEnv()
101101
{
102102
return Android_JNI_GetEnv();
103103
}

pythonforandroid/recipes/pyjnius/webviewjni_jnienv_getter.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ index ac89fec..71daa43 100644
55
@@ -1,5 +1,5 @@
66
# on android, rely on SDL to get the JNI env
77
-cdef extern JNIEnv *SDL_ANDROID_GetJNIEnv()
8-
+cdef extern JNIEnv *SDL_AndroidGetJNIEnv()
8+
+cdef extern JNIEnv *WebView_AndroidGetJNIEnv()
99

1010
cdef JNIEnv *get_platform_jnienv():
1111
- return SDL_ANDROID_GetJNIEnv()
12-
+ return <JNIEnv*>SDL_AndroidGetJNIEnv()
12+
+ return <JNIEnv*>WebView_AndroidGetJNIEnv()
1313
diff --git a/setup.py b/setup.py
1414
index 740510f..0c8e55f 100644
1515
--- a/setup.py

0 commit comments

Comments
 (0)