mirror of
https://github.com/python/cpython.git
synced 2026-04-14 07:41:00 +00:00
gh-146143: Fix the PyUnicodeWriter_WriteUCS4() signature (GH-146144)
It now accepts a pointer to constant buffer of Py_UCS4.
This commit is contained in:
parent
0f2246b155
commit
becd7a967f
4 changed files with 5 additions and 3 deletions
|
|
@ -1867,7 +1867,7 @@ 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)
|
||||
.. c:function:: int PyUnicodeWriter_WriteUCS4(PyUnicodeWriter *writer, const Py_UCS4 *str, Py_ssize_t size)
|
||||
|
||||
Writer the UCS4 string *str* into *writer*.
|
||||
|
||||
|
|
|
|||
|
|
@ -496,7 +496,7 @@ PyAPI_FUNC(int) PyUnicodeWriter_WriteWideChar(
|
|||
Py_ssize_t size);
|
||||
PyAPI_FUNC(int) PyUnicodeWriter_WriteUCS4(
|
||||
PyUnicodeWriter *writer,
|
||||
Py_UCS4 *str,
|
||||
const Py_UCS4 *str,
|
||||
Py_ssize_t size);
|
||||
|
||||
PyAPI_FUNC(int) PyUnicodeWriter_WriteStr(
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
:c:func:`PyUnicodeWriter_WriteUCS4` now accepts a pointer to a constant buffer
|
||||
of ``Py_UCS4``.
|
||||
|
|
@ -2224,7 +2224,7 @@ _PyUnicode_FromUCS4(const Py_UCS4 *u, Py_ssize_t size)
|
|||
|
||||
int
|
||||
PyUnicodeWriter_WriteUCS4(PyUnicodeWriter *pub_writer,
|
||||
Py_UCS4 *str,
|
||||
const Py_UCS4 *str,
|
||||
Py_ssize_t size)
|
||||
{
|
||||
_PyUnicodeWriter *writer = (_PyUnicodeWriter*)pub_writer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue