summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-06-05 20:15:52 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2007-06-05 20:15:52 (GMT)
commit360b01a6630e0d129ef0f00ddae1a9d054f9d8d5 (patch)
treee10cc889d29de9da23b61408eb1fc157d1361c78 /Python/sysmodule.c
parente7efd593900ed3ecc7c5114b6f153013135aac7f (diff)
downloadcpython-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.c4
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;
}