Skip to content
Prev Previous commit
Next Next commit
Address Petr's review
  • Loading branch information
vstinner committed Jun 22, 2024
commit da67c897d6daef4bee730a243c2a1f84ded281c4
8 changes: 6 additions & 2 deletions Doc/c-api/unicode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,9 @@ APIs:
The contents is valid as long as *unicode* is valid.

The export must be released by :c:func:`PyUnicode_ReleaseExport`.
Comment thread
vstinner marked this conversation as resolved.
The contents of the buffer are valid until they are released.

The buffer must not be modified.

*unicode*, *nbytes* and *format* must not be NULL.

Expand All @@ -369,8 +372,9 @@ APIs:
.. c:macro:: PyUnicode_FORMAT_UTF8 ``0x10`` UTF-8 string (``char*``)
=================================== ======== ===========================

*requested_formats* can be a single format or a combination of the formats
in the table above.
*requested_formats* can be a single format or a bitwise combination of the
formats in the table above.
On success, *\*format* will be set to a single one of the requested flags.

Note that future versions of Python may introduce additional formats.

Expand Down