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

This commit is contained in:
Julian Gilbey 2022-01-11 14:33:06 +00:00 committed by GitHub
parent 73decdf021
commit 43c5c1369c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
@ -332,7 +332,7 @@ 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.
@ -340,7 +340,7 @@ These APIs can be used for fast direct character conversions:
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.
@ -348,7 +348,7 @@ These APIs can be used for fast direct character conversions:
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.
@ -356,19 +356,19 @@ These APIs can be used for fast direct character conversions:
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.