diff options
| author | Victor Stinner <vstinner@python.org> | 2022-06-13 18:09:40 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-13 18:09:40 (GMT) |
| commit | df22eec4215e515e36e387b9022fb8ca95fd39af (patch) | |
| tree | 4ffe387870208583adfa22ab275ba72dcdbea1c5 /Include/cpython/cellobject.h | |
| parent | c2007573dd449ae054f9fd5227e49ac9eef00ae8 (diff) | |
| download | cpython-df22eec4215e515e36e387b9022fb8ca95fd39af.zip cpython-df22eec4215e515e36e387b9022fb8ca95fd39af.tar.gz cpython-df22eec4215e515e36e387b9022fb8ca95fd39af.tar.bz2 | |
gh-89653: PEP 670: Macros always cast arguments in cpython/ (#93766)
Header files in the Include/cpython/ are only included if
the Py_LIMITED_API macro is not defined.
Diffstat (limited to 'Include/cpython/cellobject.h')
| -rw-r--r-- | Include/cpython/cellobject.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Include/cpython/cellobject.h b/Include/cpython/cellobject.h index 344238a..0cc2656 100644 --- a/Include/cpython/cellobject.h +++ b/Include/cpython/cellobject.h @@ -27,9 +27,7 @@ static inline PyObject* PyCell_GET(PyObject *op) { cell = _Py_CAST(PyCellObject*, op); return cell->ob_ref; } -#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030c0000 -# define PyCell_GET(op) PyCell_GET(_PyObject_CAST(op)) -#endif +#define PyCell_GET(op) PyCell_GET(_PyObject_CAST(op)) static inline void PyCell_SET(PyObject *op, PyObject *value) { PyCellObject *cell; @@ -37,9 +35,7 @@ static inline void PyCell_SET(PyObject *op, PyObject *value) { cell = _Py_CAST(PyCellObject*, op); cell->ob_ref = value; } -#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030c0000 -# define PyCell_SET(op, value) PyCell_SET(_PyObject_CAST(op), (value)) -#endif +#define PyCell_SET(op, value) PyCell_SET(_PyObject_CAST(op), (value)) #ifdef __cplusplus } |
