mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Replace PyUnicode_Decode(buf, strlen(buf), Py_FileSystemDefaultEncoding,
"surrogateescape") by PyUnicode_DecodeFSDefault(val).
This commit is contained in:
parent
56fdb75453
commit
97c18ab6a5
4 changed files with 6 additions and 11 deletions
|
@ -2031,7 +2031,7 @@ posix_getcwd(int use_bytes)
|
|||
return posix_error();
|
||||
if (use_bytes)
|
||||
return PyBytes_FromStringAndSize(buf, strlen(buf));
|
||||
return PyUnicode_Decode(buf, strlen(buf), Py_FileSystemDefaultEncoding,"surrogateescape");
|
||||
return PyUnicode_DecodeFSDefault(buf);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(posix_getcwd__doc__,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue