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:
Victor Stinner 2013-04-11 22:09:04 +02:00
parent d8a5cc91e6
commit a0dd0213cc
15 changed files with 401 additions and 440 deletions

View file

@ -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)