8000 gh-119609: Add PyUnicode_Export() and PyUnicode_Import() functions by vstinner · Pull Request #119610 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-119609: Add PyUnicode_Export() and PyUnicode_Import() functions #119610

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

Closed
wants to merge 13 commits into from
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`.
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
0