From: Cédric Aguerre Date: Fri, 14 Jun 2019 09:37:50 +0000 (+0200) Subject: Fix 09b1efc for compatibility with Python 3.4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=db861df05dd5cacf75e47d104d7259d63cb72f7a;p=modules%2Fyacs.git Fix 09b1efc for compatibility with Python 3.4 --- 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();