Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions Doc/whatsnew/3.10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`.)
3 changes: 0 additions & 3 deletions Include/cpython/unicodeobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 ----------------------------------------------- */

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed ``PyUnicode_GetMax()``.
14 changes: 0 additions & 14 deletions Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down