Author: christian.heimes
Date: Wed Nov 14 01:15:01 2007
New Revision: 58965

Modified:
   python/branches/py3k/Python/sysmodule.c
Log:
Paths and file names from the fs should always be decoded with 
PyUnicode_DecodeFSDefault and not PyUnicode_FromString

Modified: python/branches/py3k/Python/sysmodule.c
==============================================================================
--- python/branches/py3k/Python/sysmodule.c     (original)
+++ python/branches/py3k/Python/sysmodule.c     Wed Nov 14 01:15:01 2007
@@ -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",
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to