8000 only try to load libpymodules.so once · kived/python-for-android@fe547e8 · GitHub
[go: up one dir, main page]

Skip to content

Commit fe547e8

Browse files
committed
only try to load libpymodules.so once
1 parent fdb2b5f commit fe547e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pythonforandroid/recipes/python2/patches/custom-loader.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
char pathbuf[260];
1313
int dlopenflags=0;
1414

15-
+ static void *libpymodules = NULL;
15+
+ static void *libpymodules = -1;
1616
+ void *rv = NULL;
1717
+
1818
+ /* Ensure we have access to libpymodules. */
19-
+ if (libpymodules == NULL) {
19+
+ if (libpymodules == -1) {
2020
+ printf("ANDROID_PRIVATE = %s\n", getenv("ANDROID_PRIVATE"));
2121
+ PyOS_snprintf(pathbuf, sizeof(pathbuf), "%s/libpymodules.so", getenv("ANDROID_PRIVATE"));
2222
+ libpymodules = dlopen(pathbuf, RTLD_NOW);

0 commit comments

Comments
 (0)
0