From 7ad6f74fcf9db1ccfeaf0986064870d8d3887300 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 20 Jun 2022 16:04:52 +0200 Subject: gh-87347: Add parenthesis around macro arguments (#93915) Add unit test on Py_MEMBER_SIZE() and some other macros. --- Include/structseq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Include/structseq.h') diff --git a/Include/structseq.h b/Include/structseq.h index 4f5c09f7ba..9687115561 100644 --- a/Include/structseq.h +++ b/Include/structseq.h @@ -35,9 +35,9 @@ PyAPI_FUNC(PyObject *) PyStructSequence_New(PyTypeObject* type); typedef PyTupleObject PyStructSequence; /* Macro, *only* to be used to fill in brand new objects */ -#define PyStructSequence_SET_ITEM(op, i, v) PyTuple_SET_ITEM(op, i, v) +#define PyStructSequence_SET_ITEM(op, i, v) PyTuple_SET_ITEM((op), (i), (v)) -#define PyStructSequence_GET_ITEM(op, i) PyTuple_GET_ITEM(op, i) +#define PyStructSequence_GET_ITEM(op, i) PyTuple_GET_ITEM((op), (i)) #endif PyAPI_FUNC(void) PyStructSequence_SetItem(PyObject*, Py_ssize_t, PyObject*); -- cgit v1.2.1