diff options
author | Inada Naoki <songofacandy@gmail.com> | 2020-06-29 01:46:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-29 01:46:51 (GMT) |
commit | d9f2a13106254c53550583adca70aeb3979f2993 (patch) | |
tree | a788d021fde88b2d0f8a328105a9b9a97f450167 | |
parent | 8bea91b5e9ea07ca93958e131b436024f0b1b1cf (diff) | |
download | cpython-d9f2a13106254c53550583adca70aeb3979f2993.zip cpython-d9f2a13106254c53550583adca70aeb3979f2993.tar.gz cpython-d9f2a13106254c53550583adca70aeb3979f2993.tar.bz2 |
bpo-41123: Remove PyUnicode_GetMax() (GH-21192)
-rw-r--r-- | Doc/whatsnew/3.10.rst | 3 | ||||
-rw-r--r-- | Include/cpython/unicodeobject.h | 3 | ||||
-rw-r--r-- | Misc/NEWS.d/next/C API/2020-06-28-11-39-22.bpo-41123.sjJWjQ.rst | 1 | ||||
-rw-r--r-- | Objects/unicodeobject.c | 14 |
4 files changed, 4 insertions, 17 deletions
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 51e42ec..0dd3313 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -223,3 +223,6 @@ Removed * ``Py_UNICODE_strncmp``: use :c:func:`PyUnicode_Tailmatch` * ``Py_UNICODE_strchr``, ``Py_UNICODE_strrchr``: use :c:func:`PyUnicode_FindChar` + +* Removed ``PyUnicode_GetMax()``. Please migrate to new (:pep:`393`) APIs. + (Contributed by Inada Naoki in :issue:`41103`.) diff --git a/Include/cpython/unicodeobject.h b/Include/cpython/unicodeobject.h index bcf9984..c1a8564 100644 --- a/Include/cpython/unicodeobject.h +++ b/Include/cpython/unicodeobject.h @@ -593,9 +593,6 @@ Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicodeAndSize( Py_ssize_t *size /* location where to save the length */ ); -/* Get the maximum ordinal for a Unicode character. */ -Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE) PyUnicode_GetMax(void); - /* --- _PyUnicodeWriter API ----------------------------------------------- */ diff --git a/Misc/NEWS.d/next/C API/2020-06-28-11-39-22.bpo-41123.sjJWjQ.rst b/Misc/NEWS.d/next/C API/2020-06-28-11-39-22.bpo-41123.sjJWjQ.rst new file mode 100644 index 0000000..9733145 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2020-06-28-11-39-22.bpo-41123.sjJWjQ.rst @@ -0,0 +1 @@ +Removed ``PyUnicode_GetMax()``. diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index dc0f525..6fa6c3f 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -497,20 +497,6 @@ unicode_check_encoding_errors(const char *encoding, const char *errors) } -/* The max unicode value is always 0x10FFFF while using the PEP-393 API. - This function is kept for backward compatibility with the old API. */ -Py_UNICODE -PyUnicode_GetMax(void) -{ -#ifdef Py_UNICODE_WIDE - return 0x10FFFF; -#else - /* This is actually an illegal character, so it should - not be passed to unichr. */ - return 0xFFFF; -#endif -} - int _PyUnicode_CheckConsistency(PyObject *op, int check_content) { |