Skip to content

closes bpo-46253: Change Py_UNICODE to Py_UCS4 in the C API docs to match the current source code #30387

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

Merged
merged 3 commits into from
Jan 11, 2022
Merged
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
34 changes: 17 additions & 17 deletions Doc/c-api/unicode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -268,57 +268,57 @@ are available through these macros which are mapped to C functions depending on
the Python configuration.


.. c:function:: int Py_UNICODE_ISSPACE(Py_UNICODE ch)
.. c:function:: int Py_UNICODE_ISSPACE(Py_UCS4 ch)

Return ``1`` or ``0`` depending on whether *ch* is a whitespace character.


.. c:function:: int Py_UNICODE_ISLOWER(Py_UNICODE ch)
.. c:function:: int Py_UNICODE_ISLOWER(Py_UCS4 ch)

Return ``1`` or ``0`` depending on whether *ch* is a lowercase character.


.. c:function:: int Py_UNICODE_ISUPPER(Py_UNICODE ch)
.. c:function:: int Py_UNICODE_ISUPPER(Py_UCS4 ch)

Return ``1`` or ``0`` depending on whether *ch* is an uppercase character.


.. c:function:: int Py_UNICODE_ISTITLE(Py_UNICODE ch)
.. c:function:: int Py_UNICODE_ISTITLE(Py_UCS4 ch)

Return ``1`` or ``0`` depending on whether *ch* is a titlecase character.


.. c:function:: int Py_UNICODE_ISLINEBREAK(Py_UNICODE ch)
.. c:function:: int Py_UNICODE_ISLINEBREAK(Py_UCS4 ch)

Return ``1`` or ``0`` depending on whether *ch* is a linebreak character.


.. c:function:: int Py_UNICODE_ISDECIMAL(Py_UNICODE ch)
.. c:function:: int Py_UNICODE_ISDECIMAL(Py_UCS4 ch)

Return ``1`` or ``0`` depending on whether *ch* is a decimal character.


.. c:function:: int Py_UNICODE_ISDIGIT(Py_UNICODE ch)
.. c:function:: int Py_UNICODE_ISDIGIT(Py_UCS4 ch)

Return ``1`` or ``0`` depending on whether *ch* is a digit character.


.. c:function:: int Py_UNICODE_ISNUMERIC(Py_UNICODE ch)
.. c:function:: int Py_UNICODE_ISNUMERIC(Py_UCS4 ch)

Return ``1`` or ``0`` depending on whether *ch* is a numeric character.


.. c:function:: int Py_UNICODE_ISALPHA(Py_UNICODE ch)
.. c:function:: int Py_UNICODE_ISALPHA(Py_UCS4 ch)

Return ``1`` or ``0`` depending on whether *ch* is an alphabetic character.


.. c:function:: int Py_UNICODE_ISALNUM(Py_UNICODE ch)
.. c:function:: int Py_UNICODE_ISALNUM(Py_UCS4 ch)

Return ``1`` or ``0`` depending on whether *ch* is an alphanumeric character.


.. c:function:: int Py_UNICODE_ISPRINTABLE(Py_UNICODE ch)
.. c:function:: int Py_UNICODE_ISPRINTABLE(Py_UCS4 ch)

Return ``1`` or ``0`` depending on whether *ch* is a printable character.
Nonprintable characters are those characters defined in the Unicode character
Expand All @@ -332,43 +332,43 @@ the Python configuration.
These APIs can be used for fast direct character conversions:


.. c:function:: Py_UNICODE Py_UNICODE_TOLOWER(Py_UNICODE ch)
.. c:function:: Py_UCS4 Py_UNICODE_TOLOWER(Py_UCS4 ch)

Return the character *ch* converted to lower case.

.. deprecated:: 3.3
This function uses simple case mappings.


.. c:function:: Py_UNICODE Py_UNICODE_TOUPPER(Py_UNICODE ch)
.. c:function:: Py_UCS4 Py_UNICODE_TOUPPER(Py_UCS4 ch)

Return the character *ch* converted to upper case.

.. deprecated:: 3.3
This function uses simple case mappings.


.. c:function:: Py_UNICODE Py_UNICODE_TOTITLE(Py_UNICODE ch)
.. c:function:: Py_UCS4 Py_UNICODE_TOTITLE(Py_UCS4 ch)

Return the character *ch* converted to title case.

.. deprecated:: 3.3
This function uses simple case mappings.


.. c:function:: int Py_UNICODE_TODECIMAL(Py_UNICODE ch)
.. c:function:: int Py_UNICODE_TODECIMAL(Py_UCS4 ch)

Return the character *ch* converted to a decimal positive integer. Return
``-1`` if this is not possible. This macro does not raise exceptions.


.. c:function:: int Py_UNICODE_TODIGIT(Py_UNICODE ch)
.. c:function:: int Py_UNICODE_TODIGIT(Py_UCS4 ch)

Return the character *ch* converted to a single digit integer. Return ``-1`` if
this is not possible. This macro does not raise exceptions.


.. c:function:: double Py_UNICODE_TONUMERIC(Py_UNICODE ch)
.. c:function:: double Py_UNICODE_TONUMERIC(Py_UCS4 ch)

Return the character *ch* converted to a double. Return ``-1.0`` if this is not
possible. This macro does not raise exceptions.
Expand Down