mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Close #17693: Rewrite CJK decoders to use the _PyUnicodeWriter API instead of
the legacy Py_UNICODE API. Add also a new _PyUnicodeWriter_WriteChar() function.
This commit is contained in:
parent
d8a5cc91e6
commit
a0dd0213cc
15 changed files with 401 additions and 440 deletions
|
@ -933,6 +933,13 @@ PyAPI_FUNC(int)
|
|||
_PyUnicodeWriter_PrepareInternal(_PyUnicodeWriter *writer,
|
||||
Py_ssize_t length, Py_UCS4 maxchar);
|
||||
|
||||
/* Append a Unicode character.
|
||||
Return 0 on success, raise an exception and return -1 on error. */
|
||||
PyAPI_FUNC(int)
|
||||
_PyUnicodeWriter_WriteChar(_PyUnicodeWriter *writer,
|
||||
Py_UCS4 ch
|
||||
);
|
||||
|
||||
/* Append a Unicode string.
|
||||
Return 0 on success, raise an exception and return -1 on error. */
|
||||
PyAPI_FUNC(int)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue