summaryrefslogtreecommitdiffstats
path: root/Include/setobject.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-06-16 11:49:43 (GMT)
committerGitHub <noreply@github.com>2022-06-16 11:49:43 (GMT)
commit7546914e3f8157d8bad2998677e0ea3ed4cb7939 (patch)
tree13ca68df49a1a1f0281ecd352991235752a28a09 /Include/setobject.h
parent484b40bf189ae881992366f2b7b6b63812d18591 (diff)
downloadcpython-7546914e3f8157d8bad2998677e0ea3ed4cb7939.zip
cpython-7546914e3f8157d8bad2998677e0ea3ed4cb7939.tar.gz
cpython-7546914e3f8157d8bad2998677e0ea3ed4cb7939.tar.bz2
gh-87347: Add parenthesis around PyXXX_Check() arguments (#92815)
Diffstat (limited to 'Include/setobject.h')
-rw-r--r--Include/setobject.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/Include/setobject.h b/Include/setobject.h
index fdad706..62c9e6b 100644
--- a/Include/setobject.h
+++ b/Include/setobject.h
@@ -20,21 +20,21 @@ PyAPI_FUNC(int) PySet_Discard(PyObject *set, PyObject *key);
PyAPI_FUNC(PyObject *) PySet_Pop(PyObject *set);
PyAPI_FUNC(Py_ssize_t) PySet_Size(PyObject *anyset);
-#define PyFrozenSet_CheckExact(ob) Py_IS_TYPE(ob, &PyFrozenSet_Type)
+#define PyFrozenSet_CheckExact(ob) Py_IS_TYPE((ob), &PyFrozenSet_Type)
#define PyFrozenSet_Check(ob) \
- (Py_IS_TYPE(ob, &PyFrozenSet_Type) || \
+ (Py_IS_TYPE((ob), &PyFrozenSet_Type) || \
PyType_IsSubtype(Py_TYPE(ob), &PyFrozenSet_Type))
#define PyAnySet_CheckExact(ob) \
- (Py_IS_TYPE(ob, &PySet_Type) || Py_IS_TYPE(ob, &PyFrozenSet_Type))
+ (Py_IS_TYPE((ob), &PySet_Type) || Py_IS_TYPE((ob), &PyFrozenSet_Type))
#define PyAnySet_Check(ob) \
- (Py_IS_TYPE(ob, &PySet_Type) || Py_IS_TYPE(ob, &PyFrozenSet_Type) || \
+ (Py_IS_TYPE((ob), &PySet_Type) || Py_IS_TYPE((ob), &PyFrozenSet_Type) || \
PyType_IsSubtype(Py_TYPE(ob), &PySet_Type) || \
PyType_IsSubtype(Py_TYPE(ob), &PyFrozenSet_Type))
#define PySet_CheckExact(op) Py_IS_TYPE(op, &PySet_Type)
#define PySet_Check(ob) \
- (Py_IS_TYPE(ob, &PySet_Type) || \
+ (Py_IS_TYPE((ob), &PySet_Type) || \
PyType_IsSubtype(Py_TYPE(ob), &PySet_Type))
#ifndef Py_LIMITED_API