Fixed pya.cc build with Py3/Linux

This commit is contained in:
Matthias Koefferlein 2018-07-14 20:32:13 +00:00
parent e709cad9c8
commit 6a3914fcf6
1 changed files with 2 additions and 7 deletions

View File

@ -250,13 +250,8 @@ PythonInterpreter::PythonInterpreter ()
const char *python_path = getenv ("KLAYOUT_PYTHONPATH");
if (python_path) {
QString path = QString::fromLocal8Bit (python_path);
if (sizeof (wchar_t) == 4) {
Py_SetPath ((const wchar_t *) path.toUcs4 ().constData ());
} else if (sizeof (wchar_t) == 2) {
Py_SetPath ((const wchar_t *) path.utf16 ());
}
std::wstring path = tl::to_wstring (tl::to_string_from_local (python_path));
Py_SetPath (path.c_str ());
}