From c5d215829ddf736a5e400d3daa60b25fada80685 Mon Sep 17 00:00:00 2001 From: Alexander Taylor Date: Sun, 27 Jan 2019 18:34:22 +0100 Subject: [PATCH] Fix C code being wrong for python2 in start.c (char * to wchar_t *) Avoids warning for python2 when compiling libmain.so: `incompatible pointer types passing 'unsigned int [15]' to parameter of type 'char *' [-Wincompatible-pointer-types]` --- .../bootstraps/common/build/jni/application/src/start.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pythonforandroid/bootstraps/common/build/jni/application/src/start.c b/pythonforandroid/bootstraps/common/build/jni/application/src/start.c index 8ab201769e..cc4e5db603 100644 --- a/pythonforandroid/bootstraps/common/build/jni/application/src/start.c +++ b/pythonforandroid/bootstraps/common/build/jni/application/src/start.c @@ -152,7 +152,11 @@ int main(int argc, char *argv[]) { Py_NoSiteFlag=1; #endif +#if PY_MAJOR_VERSION < 3 + Py_SetProgramName("android_python"); +#else Py_SetProgramName(L"android_python"); +#endif #if PY_MAJOR_VERSION >= 3 /* our logging module for android