Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Prev Previous commit
Next Next commit
unicode fix 4
Co-authored-by: Petr Viktorin <[email protected]>
  • Loading branch information
Yashp002 and encukou authored Jan 8, 2026
commit a93440434c74bdab734a223a8e1ddecc70394c88
21 changes: 13 additions & 8 deletions Doc/c-api/unicode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,27 @@ Python:
.. versionadded:: 3.3


.. c:macro:: PyUnicode_IS_COMPACT(o)
The structure of a particular object can be determined using the following
macros.
The macros cannot fail; their behavior is undefined if their argument
is not a Python Unicode object.

Return true if the Unicode object *o* is a compact string.
Compact strings use the :c:struct:`PyCompactUnicodeObject` structure.
.. c:namespace:: NULL

.. versionadded:: 3.3
.. c:macro:: PyUnicode_IS_COMPACT(o)

True if *o* uses the :c:struct:`PyCompactUnicodeObject` structure.

.. c:macro:: PyUnicode_IS_COMPACT_ASCII(o)
.. versionadded:: 3.3

Return true if the Unicode object *o* is a compact ASCII string.
Compact ASCII strings use the :c:struct:`PyASCIIObject` structure.

.. versionadded:: 3.3
.. c:macro:: PyUnicode_IS_COMPACT_ASCII(o)

True if *o* uses the :c:struct:`PyASCIIObject` structure.

.. versionadded:: 3.3


The following APIs are C macros and static inlined functions for fast checks and
access to internal read-only data of Unicode objects:

Expand Down
Loading