mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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
|
@ -10,7 +10,7 @@ extern "C" {
|
|||
PyAPI_DATA(PyTypeObject) PyModule_Type;
|
||||
|
||||
#define PyModule_Check(op) PyObject_TypeCheck(op, &PyModule_Type)
|
||||
#define PyModule_CheckExact(op) (Py_TYPE(op) == &PyModule_Type)
|
||||
#define PyModule_CheckExact(op) Py_IS_TYPE(op, &PyModule_Type)
|
||||
|
||||
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
|
||||
PyAPI_FUNC(PyObject *) PyModule_NewObject(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue