diff options
author | Victor Stinner <vstinner@python.org> | 2022-12-06 22:40:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-06 22:40:05 (GMT) |
commit | abbe4482ab914d6da8b1678ad46174cb875ed7f6 (patch) | |
tree | c022ab83383c4376c24826d260541377d2e1733a /Include | |
parent | 679efbb080242fc5be63ad873968f05faeef889f (diff) | |
download | cpython-abbe4482ab914d6da8b1678ad46174cb875ed7f6.zip cpython-abbe4482ab914d6da8b1678ad46174cb875ed7f6.tar.gz cpython-abbe4482ab914d6da8b1678ad46174cb875ed7f6.tar.bz2 |
PyUnicode_KIND() uses _Py_RVALUE() (#100060)
The PyUnicode_KIND() macro is modified to use _Py_RVALUE(), so it can
no longer be used as a l-value.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/cpython/unicodeobject.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/cpython/unicodeobject.h b/Include/cpython/unicodeobject.h index a75336f..75a74ff 100644 --- a/Include/cpython/unicodeobject.h +++ b/Include/cpython/unicodeobject.h @@ -231,7 +231,7 @@ enum PyUnicode_Kind { // new compiler warnings on "kind < PyUnicode_KIND(str)" (compare signed and // unsigned numbers) where kind type is an int or on // "unsigned int kind = PyUnicode_KIND(str)" (cast signed to unsigned). -#define PyUnicode_KIND(op) (_PyASCIIObject_CAST(op)->state.kind) +#define PyUnicode_KIND(op) _Py_RVALUE(_PyASCIIObject_CAST(op)->state.kind) /* Return a void pointer to the raw unicode buffer. */ static inline void* _PyUnicode_COMPACT_DATA(PyObject *op) { |