mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-93103: Update PyUnicode_DecodeFSDefault() doc (#93105)
Update documentation of PyUnicode_DecodeFSDefault(), PyUnicode_DecodeFSDefaultAndSize() and PyUnicode_EncodeFSDefault(): they now use the filesystem encoding and error handler of PyConfig, Py_FileSystemDefaultEncoding and Py_FileSystemDefaultEncodeErrors variables are no longer used.
This commit is contained in:
parent
764e83db85
commit
fc00667247
2 changed files with 30 additions and 60 deletions
|
@ -755,38 +755,22 @@ PyAPI_FUNC(int) PyUnicode_FSConverter(PyObject*, void*);
|
|||
|
||||
PyAPI_FUNC(int) PyUnicode_FSDecoder(PyObject*, void*);
|
||||
|
||||
/* Decode a null-terminated string using Py_FileSystemDefaultEncoding
|
||||
and the "surrogateescape" error handler.
|
||||
|
||||
If Py_FileSystemDefaultEncoding is not set, fall back to the locale
|
||||
encoding.
|
||||
|
||||
Use PyUnicode_DecodeFSDefaultAndSize() if the string length is known.
|
||||
*/
|
||||
/* Decode a null-terminated string from the Python filesystem encoding
|
||||
and error handler.
|
||||
|
||||
If the string length is known, use PyUnicode_DecodeFSDefaultAndSize(). */
|
||||
PyAPI_FUNC(PyObject*) PyUnicode_DecodeFSDefault(
|
||||
const char *s /* encoded string */
|
||||
);
|
||||
|
||||
/* Decode a string using Py_FileSystemDefaultEncoding
|
||||
and the "surrogateescape" error handler.
|
||||
|
||||
If Py_FileSystemDefaultEncoding is not set, fall back to the locale
|
||||
encoding.
|
||||
*/
|
||||
|
||||
/* Decode a string from the Python filesystem encoding and error handler. */
|
||||
PyAPI_FUNC(PyObject*) PyUnicode_DecodeFSDefaultAndSize(
|
||||
const char *s, /* encoded string */
|
||||
Py_ssize_t size /* size */
|
||||
);
|
||||
|
||||
/* Encode a Unicode object to Py_FileSystemDefaultEncoding with the
|
||||
"surrogateescape" error handler, and return bytes.
|
||||
|
||||
If Py_FileSystemDefaultEncoding is not set, fall back to the locale
|
||||
encoding.
|
||||
*/
|
||||
|
||||
/* Encode a Unicode object to the Python filesystem encoding and error handler.
|
||||
Return bytes. */
|
||||
PyAPI_FUNC(PyObject*) PyUnicode_EncodeFSDefault(
|
||||
PyObject *unicode
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue