diff options
| author | Victor Stinner <vstinner@python.org> | 2022-06-20 16:04:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-20 16:04:52 +0200 |
| commit | 7ad6f74fcf9db1ccfeaf0986064870d8d3887300 (patch) | |
| tree | 2b140e0e4fdb3b58379887bab6ff68ade5c67c60 /Include/structseq.h | |
| parent | 61f24e7885bed096b5d7f75aff13c1001994b35a (diff) | |
| download | cpython-git-7ad6f74fcf9db1ccfeaf0986064870d8d3887300.tar.gz | |
gh-87347: Add parenthesis around macro arguments (#93915)
Add unit test on Py_MEMBER_SIZE() and some other macros.
Diffstat (limited to 'Include/structseq.h')
| -rw-r--r-- | Include/structseq.h | 4 |
1 files changed, 2 insertions, 2 deletions
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*); |
