mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +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) PyODictItems_Type;
|
|||
PyAPI_DATA(PyTypeObject) PyODictValues_Type;
|
||||
|
||||
#define PyODict_Check(op) PyObject_TypeCheck(op, &PyODict_Type)
|
||||
#define PyODict_CheckExact(op) (Py_TYPE(op) == &PyODict_Type)
|
||||
#define PyODict_CheckExact(op) Py_IS_TYPE(op, &PyODict_Type)
|
||||
#define PyODict_SIZE(op) PyDict_GET_SIZE((op))
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyODict_New(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue