Mercurial > cpython-lru_cache-weakref
diff Python/sysmodule.c @ 43847:0377ba9bc359
Paths and file names from the fs should always be decoded with PyUnicode_DecodeFSDefault and not PyUnicode_FromString
| author | Christian Heimes <christian@cheimes.de> |
|---|---|
| date | Wed, 14 Nov 2007 00:15:01 +0000 |
| parents | 1561763cda72 |
| children | ee081609cee8 |
line wrap: on
line diff
--- a/Python/sysmodule.c Tue Nov 13 15:24:14 2007 +0000 +++ b/Python/sysmodule.c Wed Nov 14 00:15:01 2007 +0000 @@ -1072,11 +1072,12 @@ 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",
