summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Include/cpython/tupleobject.h
diff options
context:
space:
mode:
authorAlexSm <[email protected]>2024-02-16 11:51:30 +0100
committerGitHub <[email protected]>2024-02-16 11:51:30 +0100
commit506ecaee93b52cc12c2e2f97c3d42e3ca2a7f59e (patch)
treed096fb9eb988fbb0ca1ba970041773207ce3aa70 /contrib/tools/python3/src/Include/cpython/tupleobject.h
parent4749b9e5d260714490997e6f5ee1ee8c1c8fc46c (diff)
parentf200f72c9d7a89c1018e3dc6b46c49fe2ecf84fb (diff)
Merge pull request #1940 from dcherednik/importlib
Library import 14
Diffstat (limited to 'contrib/tools/python3/src/Include/cpython/tupleobject.h')
-rw-r--r--contrib/tools/python3/src/Include/cpython/tupleobject.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/contrib/tools/python3/src/Include/cpython/tupleobject.h b/contrib/tools/python3/src/Include/cpython/tupleobject.h
index 3d9c1aff588..f6a1f076e03 100644
--- a/contrib/tools/python3/src/Include/cpython/tupleobject.h
+++ b/contrib/tools/python3/src/Include/cpython/tupleobject.h
@@ -23,11 +23,9 @@ 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])
+#define PyTuple_GET_ITEM(op, index) (_PyTuple_CAST(op)->ob_item[(index)])
/* Function *only* to be used to fill in brand new tuples */
static inline void
@@ -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
+ PyTuple_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value))
PyAPI_FUNC(void) _PyTuple_DebugMallocStats(FILE *out);