mirror of
https://github.com/python/cpython.git
synced 2025-10-07 15:42:02 +00:00
bpo-39573: Add Py_IS_TYPE() function (GH-18488)
Co-Author: Neil Schemenauer <nas-github@arctrix.com>
This commit is contained in:
parent
968dcd9e7a
commit
d905df766c
32 changed files with 61 additions and 46 deletions
|
@ -19,7 +19,7 @@ PyAPI_DATA(PyTypeObject) PyRange_Type;
|
|||
PyAPI_DATA(PyTypeObject) PyRangeIter_Type;
|
||||
PyAPI_DATA(PyTypeObject) PyLongRangeIter_Type;
|
||||
|
||||
#define PyRange_Check(op) (Py_TYPE(op) == &PyRange_Type)
|
||||
#define PyRange_Check(op) Py_IS_TYPE(op, &PyRange_Type)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue