mirror of
https://github.com/python/cpython.git
synced 2026-03-01 10:30:55 +00:00
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.
This commit is contained in:
parent
65417988a5
commit
7bae15cf37
5 changed files with 6 additions and 6 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue