summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-11-14 00:15:01 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-11-14 00:15:01 (GMT)
commiteb9b39bd579b6365481542a82f2f481352f008db (patch)
tree399c3adcf14ad4c14b1c3a0e04315ff69098ad1a /Python
parentfef9bbaff2513f1b17f5aa2b9a44e3d32855f082 (diff)
downloadcpython-eb9b39bd579b6365481542a82f2f481352f008db.zip
cpython-eb9b39bd579b6365481542a82f2f481352f008db.tar.gz
cpython-eb9b39bd579b6365481542a82f2f481352f008db.tar.bz2
Paths and file names from the fs should always be decoded with PyUnicode_DecodeFSDefault and not PyUnicode_FromString
Diffstat (limited to 'Python')
-rw-r--r--Python/sysmodule.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 6fcbe75..b77d184 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -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",