diff options
author | Walter Dörwald <walter@livinglogic.de> | 2007-06-05 20:15:52 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2007-06-05 20:15:52 (GMT) |
commit | 360b01a6630e0d129ef0f00ddae1a9d054f9d8d5 (patch) | |
tree | e10cc889d29de9da23b61408eb1fc157d1361c78 /Python/sysmodule.c | |
parent | e7efd593900ed3ecc7c5114b6f153013135aac7f (diff) | |
download | cpython-360b01a6630e0d129ef0f00ddae1a9d054f9d8d5.zip cpython-360b01a6630e0d129ef0f00ddae1a9d054f9d8d5.tar.gz cpython-360b01a6630e0d129ef0f00ddae1a9d054f9d8d5.tar.bz2 |
Change getdefaultencoding() and getfilesystemencoding()
to return unicode strings.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 9eebc14..1756834 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -214,7 +214,7 @@ exit status will be one (i.e., failure)." static PyObject * sys_getdefaultencoding(PyObject *self) { - return PyString_FromString(PyUnicode_GetDefaultEncoding()); + return PyUnicode_FromString(PyUnicode_GetDefaultEncoding()); } PyDoc_STRVAR(getdefaultencoding_doc, @@ -246,7 +246,7 @@ static PyObject * sys_getfilesystemencoding(PyObject *self) { if (Py_FileSystemDefaultEncoding) - return PyString_FromString(Py_FileSystemDefaultEncoding); + return PyUnicode_FromString(Py_FileSystemDefaultEncoding); Py_INCREF(Py_None); return Py_None; } |