]> granicus.if.org Git - python/commitdiff
Use unicode
authorNeal Norwitz <nnorwitz@gmail.com>
Sat, 25 Aug 2007 01:04:34 +0000 (01:04 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sat, 25 Aug 2007 01:04:34 +0000 (01:04 +0000)
Python/sysmodule.c

index 4f9313aa47ae4b9ab42530c4d57962f06df5dbdf..6ccd3e9a3e9c0f3ea239bad3836c28504c7a434d 100644 (file)
@@ -829,7 +829,7 @@ PySys_AddWarnOption(const char *s)
                if (warnoptions == NULL)
                        return;
        }
-       str = PyString_FromString(s);
+       str = PyUnicode_FromString(s);
        if (str != NULL) {
                PyList_Append(warnoptions, str);
                Py_DECREF(str);
@@ -1080,11 +1080,11 @@ _PySys_Init(void)
        SET_SYS_FROM_STRING("platform",
                            PyUnicode_FromString(Py_GetPlatform()));
        SET_SYS_FROM_STRING("executable",
-                           PyString_FromString(Py_GetProgramFullPath()));
+                           PyUnicode_FromString(Py_GetProgramFullPath()));
        SET_SYS_FROM_STRING("prefix",
-                           PyString_FromString(Py_GetPrefix()));
+                           PyUnicode_FromString(Py_GetPrefix()));
        SET_SYS_FROM_STRING("exec_prefix",
-                           PyString_FromString(Py_GetExecPrefix()));
+                           PyUnicode_FromString(Py_GetExecPrefix()));
        SET_SYS_FROM_STRING("maxint",
                            PyInt_FromLong(PyInt_GetMax()));
        SET_SYS_FROM_STRING("maxunicode",