]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-89653: PEP 670: Convert unicodeobject.h macros to functions (#92648)
authorVictor Stinner <vstinner@python.org>
Wed, 11 May 2022 21:28:39 +0000 (23:28 +0200)
committerGitHub <noreply@github.com>
Wed, 11 May 2022 21:28:39 +0000 (23:28 +0200)
commiteb88f21301931449718cd4d105018d167a02788b
tree1f437ade12c7c0094cc2c3f4d176f2169b1e509f
parent1d1929fcb55f8fa9317c19ed4789e1dd6c435092
gh-89653: PEP 670: Convert unicodeobject.h macros to functions (#92648)

Convert the following Unicode macros to static inline functions.

Surrogate functions:

* Py_UNICODE_IS_SURROGATE()
* Py_UNICODE_IS_HIGH_SURROGATE()
* Py_UNICODE_IS_LOW_SURROGATE()
* Py_UNICODE_HIGH_SURROGATE()
* Py_UNICODE_LOW_SURROGATE()
* Py_UNICODE_JOIN_SURROGATES()

"Is" functions:

* Py_UNICODE_ISALNUM()
* Py_UNICODE_ISSPACE()

In the implementation of these functions, the character type is now
well defined to Py_UCS4.
Include/cpython/unicodeobject.h