Salome HOME
[PYTHON3] Compatibility with Python 3.4
authorGilles DAVID <gilles-g.david@edf.fr>
Thu, 20 Apr 2017 14:59:51 +0000 (16:59 +0200)
committerGilles DAVID <gilles-g.david@edf.fr>
Thu, 20 Apr 2017 14:59:51 +0000 (16:59 +0200)
src/runtime/TypeConversions.hxx

index cd3a330a1d5eab5ba36b1bf29b5e8d9861b455b1..2d3c3079ca03c8705d040f55a7946be8ff9a529c 100644 (file)
 #include <libxml/parser.h>
 #include <string>
 
+#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
+
 namespace YACS
 {
   namespace ENGINE