]> SALOME platform Git repositories - modules/yacs.git/commitdiff
Salome HOME
Fix 09b1efc for compatibility with Python 3.4
authorCédric Aguerre <cedric.aguerre@edf.fr>
Fri, 14 Jun 2019 09:37:50 +0000 (11:37 +0200)
committerCédric Aguerre <cedric.aguerre@edf.fr>
Fri, 14 Jun 2019 09:37:50 +0000 (11:37 +0200)
src/Container/SALOME_CPythonHelper.cxx

index c1032a298229d1149091142a2b3d8ce84028e042..07d6dfe6bdb8cd4de9b303f97eff929afeb8bd67 100644 (file)
 
 #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();