diff options
| author | Victor Stinner <vstinner@python.org> | 2022-11-28 17:42:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-28 17:42:22 +0100 |
| commit | 7bae15cf37239d4d345e09cc318bd82d03ec30cd (patch) | |
| tree | 578f5942b8a43b9720cf02bb5d35e7cd4d3926c6 /Include/cpython | |
| parent | 65417988a589e6edfeada83227a8b0884a64af4f (diff) | |
| download | cpython-git-7bae15cf37239d4d345e09cc318bd82d03ec30cd.tar.gz | |
Use _Py_RVALUE() in macros (#99844)
The following macros are modified to use _Py_RVALUE(), so they can no
longer be used as l-value:
* DK_LOG_SIZE()
* _PyCode_CODE()
* _PyList_ITEMS()
* _PyTuple_ITEMS()
* _Py_SLIST_HEAD()
* _Py_SLIST_ITEM_NEXT()
_PyCode_CODE() is private and other macros are part of the internal
C API.
Diffstat (limited to 'Include/cpython')
| -rw-r--r-- | Include/cpython/code.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/cpython/code.h b/Include/cpython/code.h index 15b464fe2e..fd57e0035b 100644 --- a/Include/cpython/code.h +++ b/Include/cpython/code.h @@ -153,7 +153,7 @@ static inline Py_ssize_t PyCode_GetNumFree(PyCodeObject *op) { return op->co_nfreevars; } -#define _PyCode_CODE(CO) ((_Py_CODEUNIT *)(CO)->co_code_adaptive) +#define _PyCode_CODE(CO) _Py_RVALUE((_Py_CODEUNIT *)(CO)->co_code_adaptive) #define _PyCode_NBYTES(CO) (Py_SIZE(CO) * (Py_ssize_t)sizeof(_Py_CODEUNIT)) /* Public interface */ |
