mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
gh-87347: Add parenthesis around PyXXX_Check() arguments (#92815)
This commit is contained in:
parent
484b40bf18
commit
7546914e3f
34 changed files with 58 additions and 58 deletions
|
|
@ -12,12 +12,12 @@ PyAPI_DATA(PyTypeObject) _PyWeakref_RefType;
|
|||
PyAPI_DATA(PyTypeObject) _PyWeakref_ProxyType;
|
||||
PyAPI_DATA(PyTypeObject) _PyWeakref_CallableProxyType;
|
||||
|
||||
#define PyWeakref_CheckRef(op) PyObject_TypeCheck(op, &_PyWeakref_RefType)
|
||||
#define PyWeakref_CheckRef(op) PyObject_TypeCheck((op), &_PyWeakref_RefType)
|
||||
#define PyWeakref_CheckRefExact(op) \
|
||||
Py_IS_TYPE(op, &_PyWeakref_RefType)
|
||||
Py_IS_TYPE((op), &_PyWeakref_RefType)
|
||||
#define PyWeakref_CheckProxy(op) \
|
||||
(Py_IS_TYPE(op, &_PyWeakref_ProxyType) || \
|
||||
Py_IS_TYPE(op, &_PyWeakref_CallableProxyType))
|
||||
(Py_IS_TYPE((op), &_PyWeakref_ProxyType) \
|
||||
|| Py_IS_TYPE((op), &_PyWeakref_CallableProxyType))
|
||||
|
||||
#define PyWeakref_Check(op) \
|
||||
(PyWeakref_CheckRef(op) || PyWeakref_CheckProxy(op))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue