diff options
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 087457e..df7cb83 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -1849,7 +1849,7 @@ posix_ttyname(PyObject *self, PyObject *args) #endif if (ret == NULL) return posix_error(); - return PyUnicode_FromString(ret); + return PyUnicode_DecodeFSDefault(ret); } #endif @@ -1871,7 +1871,7 @@ posix_ctermid(PyObject *self, PyObject *noargs) #endif if (ret == NULL) return posix_error(); - return PyUnicode_FromString(buffer); + return PyUnicode_DecodeFSDefault(buffer); } #endif |