mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Add PyInterpreterState.fs_codec.utf8 (GH-18367)
Add a fast-path for UTF-8 encoding in PyUnicode_EncodeFSDefault() and PyUnicode_DecodeFSDefaultAndSize(). Add _PyUnicode_FiniEncodings() helper function for _PyUnicode_Fini().
This commit is contained in:
parent
0e4e735d06
commit
bf305cc6f0
2 changed files with 55 additions and 53 deletions
|
@ -102,6 +102,7 @@ struct _is {
|
|||
Later, it is set to a non-NULL string by _PyUnicode_InitEncodings(). */
|
||||
struct {
|
||||
char *encoding; /* Filesystem encoding (encoded to UTF-8) */
|
||||
int utf8; /* encoding=="utf-8"? */
|
||||
char *errors; /* Filesystem errors (encoded to UTF-8) */
|
||||
_Py_error_handler error_handler;
|
||||
} fs_codec;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue