summaryrefslogtreecommitdiff
path: root/Include/cpython/tupleobject.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-06-13 20:09:40 +0200
committerGitHub <noreply@github.com>2022-06-13 20:09:40 +0200
commitdf22eec4215e515e36e387b9022fb8ca95fd39af (patch)
tree4ffe387870208583adfa22ab275ba72dcdbea1c5 /Include/cpython/tupleobject.h
parentc2007573dd449ae054f9fd5227e49ac9eef00ae8 (diff)
downloadcpython-git-df22eec4215e515e36e387b9022fb8ca95fd39af.tar.gz
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/tupleobject.h')
-rw-r--r--Include/cpython/tupleobject.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/Include/cpython/tupleobject.h b/Include/cpython/tupleobject.h
index 3d9c1aff58..30303fa2a2 100644
--- a/Include/cpython/tupleobject.h
+++ b/Include/cpython/tupleobject.h
@@ -23,9 +23,7 @@ static inline Py_ssize_t PyTuple_GET_SIZE(PyObject *op) {
PyTupleObject *tuple = _PyTuple_CAST(op);
return Py_SIZE(tuple);
}
-#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
-# define PyTuple_GET_SIZE(op) PyTuple_GET_SIZE(_PyObject_CAST(op))
-#endif
+#define PyTuple_GET_SIZE(op) PyTuple_GET_SIZE(_PyObject_CAST(op))
#define PyTuple_GET_ITEM(op, index) (_PyTuple_CAST(op)->ob_item[index])
@@ -35,9 +33,7 @@ PyTuple_SET_ITEM(PyObject *op, Py_ssize_t index, PyObject *value) {
PyTupleObject *tuple = _PyTuple_CAST(op);
tuple->ob_item[index] = value;
}
-#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
#define PyTuple_SET_ITEM(op, index, value) \
PyTuple_SET_ITEM(_PyObject_CAST(op), index, _PyObject_CAST(value))
-#endif
PyAPI_FUNC(void) _PyTuple_DebugMallocStats(FILE *out);