mirror of
https://github.com/python/cpython.git
synced 2025-10-21 22:22:48 +00:00
Use unicode
This commit is contained in:
parent
e0a0a6e937
commit
aefab1e2ac
1 changed files with 4 additions and 4 deletions
|
@ -829,7 +829,7 @@ PySys_AddWarnOption(const char *s)
|
||||||
if (warnoptions == NULL)
|
if (warnoptions == NULL)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
str = PyString_FromString(s);
|
str = PyUnicode_FromString(s);
|
||||||
if (str != NULL) {
|
if (str != NULL) {
|
||||||
PyList_Append(warnoptions, str);
|
PyList_Append(warnoptions, str);
|
||||||
Py_DECREF(str);
|
Py_DECREF(str);
|
||||||
|
@ -1080,11 +1080,11 @@ _PySys_Init(void)
|
||||||
SET_SYS_FROM_STRING("platform",
|
SET_SYS_FROM_STRING("platform",
|
||||||
PyUnicode_FromString(Py_GetPlatform()));
|
PyUnicode_FromString(Py_GetPlatform()));
|
||||||
SET_SYS_FROM_STRING("executable",
|
SET_SYS_FROM_STRING("executable",
|
||||||
PyString_FromString(Py_GetProgramFullPath()));
|
PyUnicode_FromString(Py_GetProgramFullPath()));
|
||||||
SET_SYS_FROM_STRING("prefix",
|
SET_SYS_FROM_STRING("prefix",
|
||||||
PyString_FromString(Py_GetPrefix()));
|
PyUnicode_FromString(Py_GetPrefix()));
|
||||||
SET_SYS_FROM_STRING("exec_prefix",
|
SET_SYS_FROM_STRING("exec_prefix",
|
||||||
PyString_FromString(Py_GetExecPrefix()));
|
PyUnicode_FromString(Py_GetExecPrefix()));
|
||||||
SET_SYS_FROM_STRING("maxint",
|
SET_SYS_FROM_STRING("maxint",
|
||||||
PyInt_FromLong(PyInt_GetMax()));
|
PyInt_FromLong(PyInt_GetMax()));
|
||||||
SET_SYS_FROM_STRING("maxunicode",
|
SET_SYS_FROM_STRING("maxunicode",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue