mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
gh-87347: Add parenthesis around macro arguments (#93915)
Add unit test on Py_MEMBER_SIZE() and some other macros.
This commit is contained in:
parent
61f24e7885
commit
7ad6f74fcf
30 changed files with 171 additions and 143 deletions
|
|
@ -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*);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue