Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-46236: Add missing PyUnicode_Append() doc #130531

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Doc/c-api/unicode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,20 @@ APIs:
decref'ing the returned objects.


.. c:function:: void PyUnicode_Append(PyObject **p_left, PyObject *right)

Append the string *right* to the end of *p_left*.
*p_left* must point to a :term:`strong reference` to a Unicode object.

On error, set *\*p_left* to ``NULL`` and set an exception.


.. c:function:: void PyUnicode_AppendAndDel(PyObject **p_left, PyObject *right)

The function is similar to :c:func:`PyUnicode_Append`, with the only
difference being that it decrements the reference count of *right* by one.


.. c:function:: const char* PyUnicode_GetDefaultEncoding(void)

Return the name of the default string encoding, ``"utf-8"``.
Expand Down
8 changes: 8 additions & 0 deletions Doc/data/refcounts.dat
Original file line number Diff line number Diff line change
Expand Up @@ -2770,6 +2770,14 @@ PyUnicode_FromFormatV:PyObject*::+1:
PyUnicode_FromFormatV:const char*:format::
PyUnicode_FromFormatV:va_list:args::

PyUnicode_Append:void:::
PyUnicode_Append:PyObject**:p_left:0:
PyUnicode_Append:PyObject*:right::

PyUnicode_AppendAndDel:void:::
PyUnicode_AppendAndDel:PyObject**:p_left:0:
PyUnicode_AppendAndDel:PyObject*:right:-1:

PyUnicode_GetDefaultEncoding:const char*:::
PyUnicode_GetDefaultEncoding::void::

Expand Down
Loading