Commit eb9b39bd authored by Christian Heimes's avatar Christian Heimes

Paths and file names from the fs should always be decoded with...

Paths and file names from the fs should always be decoded with PyUnicode_DecodeFSDefault and not PyUnicode_FromString
parent fef9bbaf
......@@ -1072,11 +1072,12 @@ _PySys_Init(void)
SET_SYS_FROM_STRING("platform",
PyUnicode_FromString(Py_GetPlatform()));
SET_SYS_FROM_STRING("executable",
PyUnicode_FromString(Py_GetProgramFullPath()));
PyUnicode_DecodeFSDefault(
Py_GetProgramFullPath()));
SET_SYS_FROM_STRING("prefix",
PyUnicode_FromString(Py_GetPrefix()));
PyUnicode_DecodeFSDefault(Py_GetPrefix()));
SET_SYS_FROM_STRING("exec_prefix",
PyUnicode_FromString(Py_GetExecPrefix()));
PyUnicode_DecodeFSDefault(Py_GetExecPrefix()));
SET_SYS_FROM_STRING("maxint",
PyInt_FromLong(PyInt_GetMax()));
SET_SYS_FROM_STRING("maxsize",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment