mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +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
|
@ -8,12 +8,12 @@ extern "C" {
|
|||
PyAPI_DATA(PyTypeObject) PySeqIter_Type;
|
||||
PyAPI_DATA(PyTypeObject) PyCallIter_Type;
|
||||
|
||||
#define PySeqIter_Check(op) (Py_TYPE(op) == &PySeqIter_Type)
|
||||
#define PySeqIter_Check(op) Py_IS_TYPE(op, &PySeqIter_Type)
|
||||
|
||||
PyAPI_FUNC(PyObject *) PySeqIter_New(PyObject *);
|
||||
|
||||
|
||||
#define PyCallIter_Check(op) (Py_TYPE(op) == &PyCallIter_Type)
|
||||
#define PyCallIter_Check(op) Py_IS_TYPE(op, &PyCallIter_Type)
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyCallIter_New(PyObject *, PyObject *);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue