summaryrefslogtreecommitdiff
path: root/Include/cpython/tupleobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/cpython/tupleobject.h')
-rw-r--r--Include/cpython/tupleobject.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Include/cpython/tupleobject.h b/Include/cpython/tupleobject.h
index 30303fa2a2..f6a1f076e0 100644
--- a/Include/cpython/tupleobject.h
+++ b/Include/cpython/tupleobject.h
@@ -25,7 +25,7 @@ static inline Py_ssize_t PyTuple_GET_SIZE(PyObject *op) {
}
#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
@@ -34,6 +34,6 @@ PyTuple_SET_ITEM(PyObject *op, Py_ssize_t index, PyObject *value) {
tuple->ob_item[index] = value;
}
#define PyTuple_SET_ITEM(op, index, value) \
- PyTuple_SET_ITEM(_PyObject_CAST(op), index, _PyObject_CAST(value))
+ PyTuple_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value))
PyAPI_FUNC(void) _PyTuple_DebugMallocStats(FILE *out);