Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7efd59 commit 360b01aCopy full SHA for 360b01a
1 file changed
Python/sysmodule.c
@@ -214,7 +214,7 @@ exit status will be one (i.e., failure)."
214
static PyObject *
215
sys_getdefaultencoding(PyObject *self)
216
{
217
- return PyString_FromString(PyUnicode_GetDefaultEncoding());
+ return PyUnicode_FromString(PyUnicode_GetDefaultEncoding());
218
}
219
220
PyDoc_STRVAR(getdefaultencoding_doc,
@@ -246,7 +246,7 @@ static PyObject *
246
sys_getfilesystemencoding(PyObject *self)
247
248
if (Py_FileSystemDefaultEncoding)
249
- return PyString_FromString(Py_FileSystemDefaultEncoding);
+ return PyUnicode_FromString(Py_FileSystemDefaultEncoding);
250
Py_INCREF(Py_None);
251
return Py_None;
252
0 commit comments