gh-119182: Add PyUnicodeWriter_WriteUCS4() function (#120849)

This commit is contained in:
Victor Stinner 2024-06-24 17:40:39 +02:00 committed by GitHub
parent a47abdb45d
commit 2e157851e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 131 additions and 6 deletions

View file

@ -1563,6 +1563,15 @@ object.
On success, return ``0``.
On error, set an exception, leave the writer unchanged, and return ``-1``.
.. c:function:: int PyUnicodeWriter_WriteUCS4(PyUnicodeWriter *writer, Py_UCS4 *str, Py_ssize_t size)
Writer the UCS4 string *str* into *writer*.
*size* is a number of UCS4 characters.
On success, return ``0``.
On error, set an exception, leave the writer unchanged, and return ``-1``.
.. c:function:: int PyUnicodeWriter_WriteStr(PyUnicodeWriter *writer, PyObject *obj)
Call :c:func:`PyObject_Str` on *obj* and write the output into *writer*.