kivy-ios/recipes/python3/dynload.patch

26 lines
889 B
Diff
Raw Normal View History

--- Python-3.7.1/Python/dynload_shlib.c 2018-10-20 08:04:19.000000000 +0200
+++ Python-3.7.1/Python/dynload_shlib.c 2018-11-02 14:23:15.000000000 +0100
@@ -72,6 +72,16 @@
PyOS_snprintf(funcname, sizeof(funcname),
LEAD_UNDERSCORE "%.20s_%.200s", prefix, shortname);
+ /* On IOS, dlopen crash as soon as we try to open one of our library.
+ * Instead, we have done a redirection of linking to convert our .so into a
+ * .a. Then the main executable is linked with theses symbol. So, instead
+ * of trying to dlopen, directly do the dlsym.
+ * -- Mathieu
+ */
+ return (dl_funcptr) dlsym(RTLD_SELF, funcname);
+
+#if 0
+
if (fp != NULL) {
int i;
struct _Py_stat_struct status;
@@ -126,4 +136,5 @@
handles[nhandles++].handle = handle;
p = (dl_funcptr) dlsym(handle, funcname);
return p;
+#endif
}