summaryrefslogtreecommitdiffstats
path: root/Include/cpython/listobject.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-06-13 18:09:40 (GMT)
committerGitHub <noreply@github.com>2022-06-13 18:09:40 (GMT)
commitdf22eec4215e515e36e387b9022fb8ca95fd39af (patch)
tree4ffe387870208583adfa22ab275ba72dcdbea1c5 /Include/cpython/listobject.h
parentc2007573dd449ae054f9fd5227e49ac9eef00ae8 (diff)
downloadcpython-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/listobject.h')
-rw-r--r--Include/cpython/listobject.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/Include/cpython/listobject.h b/Include/cpython/listobject.h
index 1add821..b094560 100644
--- a/Include/cpython/listobject.h
+++ b/Include/cpython/listobject.h
@@ -34,9 +34,7 @@ static inline Py_ssize_t PyList_GET_SIZE(PyObject *op) {
PyListObject *list = _PyList_CAST(op);
return Py_SIZE(list);
}
-#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
-# define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op))
-#endif
+#define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op))
#define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[index])
@@ -45,7 +43,5 @@ PyList_SET_ITEM(PyObject *op, Py_ssize_t index, PyObject *value) {
PyListObject *list = _PyList_CAST(op);
list->ob_item[index] = value;
}
-#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
#define PyList_SET_ITEM(op, index, value) \
PyList_SET_ITEM(_PyObject_CAST(op), index, _PyObject_CAST(value))
-#endif