]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-89653: PEP 670: Convert unicodeobject.h macros to functions (#91799)
authorVictor Stinner <vstinner@python.org>
Thu, 21 Apr 2022 21:07:13 +0000 (23:07 +0200)
committerGitHub <noreply@github.com>
Thu, 21 Apr 2022 21:07:13 +0000 (23:07 +0200)
commit636ad7b47e5e1997b6e6979342fe11ae284fc1c7
treee2443954dbaa74466cafa8bdeee97002b3c7f42f
parent364ed9409269fb321dc4eafdea677c09a4bc0d8d
gh-89653: PEP 670: Convert unicodeobject.h macros to functions (#91799)

Convert unicodeobject.h macros to static inline functions:

* PyUnicode_AS_DATA()
* PyUnicode_AS_UNICODE()
* PyUnicode_GET_DATA_SIZE()
* PyUnicode_GET_SIZE()

Static inline functions are wrapped by macros which casts arguments
with _PyObject_CAST() to prevent introducing new compiler warnings
when passing "const PyObject*".
Include/cpython/unicodeobject.h