From 05b190cdbb5084bff0599b146c42923969c4525c Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 31 Mar 2019 17:46:32 +0200 Subject: [PATCH] fix build failure with Py2.7 under macOS --- src/Main/MainPy.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Main/MainPy.cpp b/src/Main/MainPy.cpp index 3c096c4e97..fa363c18b8 100644 --- a/src/Main/MainPy.cpp +++ b/src/Main/MainPy.cpp @@ -143,7 +143,11 @@ PyMOD_INIT_FUNC(FreeCAD) // backwards since the FreeCAD path was likely appended just before // we were imported. for (i = PyList_Size(pySysPath) - 1; i >= 0 ; --i) { +#if PY_MAJOR_VERSION >= 3 const char *basePath; +#else + char *basePath; +#endif PyObject *pyPath = PyList_GetItem(pySysPath, i); long sz = 0;