From db861df05dd5cacf75e47d104d7259d63cb72f7a Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Fri, 14 Jun 2019 11:37:50 +0200 Subject: [PATCH] Fix 09b1efc for compatibility with Python 3.4 --- src/Container/SALOME_CPythonHelper.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Container/SALOME_CPythonHelper.cxx b/src/Container/SALOME_CPythonHelper.cxx index c1032a298..07d6dfe6b 100644 --- a/src/Container/SALOME_CPythonHelper.cxx +++ b/src/Container/SALOME_CPythonHelper.cxx @@ -20,6 +20,19 @@ #include "SALOME_CPythonHelper.hxx" +#if PY_VERSION_HEX < 0x03050000 +static char* +Py_EncodeLocale(const wchar_t *arg, size_t *size) +{ + return _Py_wchar2char(arg, size); +} +static wchar_t* +Py_DecodeLocale(const char *arg, size_t *size) +{ + return _Py_char2wchar(arg, size); +} +#endif + void SALOME_CPythonHelper::initializePython(int argc, char *argv[]) { Py_Initialize(); -- 2.39.2