mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
gh-119182: Add PyUnicodeWriter_WriteUCS4() function (#120849)
This commit is contained in:
parent
a47abdb45d
commit
2e157851e3
7 changed files with 131 additions and 6 deletions
|
@ -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*.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue