[Python-checkins] closes bpo-46253: Change Py_UNICODE to Py_UCS4 in the C API docs to match the current source code (GH-30387)
miss-islington
webhook-mailer at python.org
Tue Jan 11 09:53:29 EST 2022
https://github.com/python/cpython/commit/4cfb10979d74b8513ec751b81454709f38e3b51a
commit: 4cfb10979d74b8513ec751b81454709f38e3b51a
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-01-11T06:53:08-08:00
summary:
closes bpo-46253: Change Py_UNICODE to Py_UCS4 in the C API docs to match the current source code (GH-30387)
(cherry picked from commit 43c5c1369cb21f08a1dc1d63923c3586b883e3e8)
Co-authored-by: Julian Gilbey <julian-git at d-and-j.net>
files:
M Doc/c-api/unicode.rst
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index cb2438e24b749..343eaf1444df6 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -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.
More information about the Python-checkins
mailing list