diff options
author | Victor Stinner <vstinner@python.org> | 2022-05-17 17:20:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-17 17:20:37 (GMT) |
commit | e6fd7992a92879103215b3e9f218fe07212af9b1 (patch) | |
tree | 1387bb0ba893f41e9b579058d6c04ce10e180931 /Include/cpython/unicodeobject.h | |
parent | 524f03c08ca6688785c0fe99d8f2b385bf92e58f (diff) | |
download | cpython-e6fd7992a92879103215b3e9f218fe07212af9b1.zip cpython-e6fd7992a92879103215b3e9f218fe07212af9b1.tar.gz cpython-e6fd7992a92879103215b3e9f218fe07212af9b1.tar.bz2 |
gh-89653: PEP 670: Fix PyUnicode_READ() cast (#92872)
_Py_CAST() cannot be used with a constant type: use _Py_STATIC_CAST()
instead.
Diffstat (limited to 'Include/cpython/unicodeobject.h')
-rw-r--r-- | Include/cpython/unicodeobject.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Include/cpython/unicodeobject.h b/Include/cpython/unicodeobject.h index 274339d..f853b69 100644 --- a/Include/cpython/unicodeobject.h +++ b/Include/cpython/unicodeobject.h @@ -340,7 +340,8 @@ static inline Py_UCS4 PyUnicode_READ(int kind, } #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000 #define PyUnicode_READ(kind, data, index) \ - PyUnicode_READ(_Py_STATIC_CAST(int, kind), _Py_CAST(const void*, data), \ + PyUnicode_READ(_Py_STATIC_CAST(int, kind), \ + _Py_STATIC_CAST(const void*, data), \ (index)) #endif |