gh-146143: Fix the PyUnicodeWriter_WriteUCS4() signature (GH-146144) · python/cpython@becd7a9 · GitHub
Skip to content

Commit becd7a9

Browse files
gh-146143: Fix the PyUnicodeWriter_WriteUCS4() signature (GH-146144)
It now accepts a pointer to constant buffer of Py_UCS4.
1 parent 0f2246b commit becd7a9

4 files changed

Lines changed: 5 additions & 3 deletions

File tree

Doc/c-api/unicode.rst

Lines changed: 1 addition & 1 deletion

Include/cpython/unicodeobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ PyAPI_FUNC(int) PyUnicodeWriter_WriteWideChar(
496496
Py_ssize_t size);
497497
PyAPI_FUNC(int) PyUnicodeWriter_WriteUCS4(
498498
PyUnicodeWriter *writer,
499-
Py_UCS4 *str,
499+
const Py_UCS4 *str,
500500
Py_ssize_t size);
501501

502502
PyAPI_FUNC(int) PyUnicodeWriter_WriteStr(
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
:c:func:`PyUnicodeWriter_WriteUCS4` now accepts a pointer to a constant buffer
2+
of ``Py_UCS4``.

Objects/unicodeobject.c

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)