mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +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
|
@ -17,9 +17,9 @@ PyAPI_DATA(PyTypeObject) PyContextToken_Type;
|
|||
typedef struct _pycontexttokenobject PyContextToken;
|
||||
|
||||
|
||||
#define PyContext_CheckExact(o) (Py_TYPE(o) == &PyContext_Type)
|
||||
#define PyContextVar_CheckExact(o) (Py_TYPE(o) == &PyContextVar_Type)
|
||||
#define PyContextToken_CheckExact(o) (Py_TYPE(o) == &PyContextToken_Type)
|
||||
#define PyContext_CheckExact(o) Py_IS_TYPE(o, &PyContext_Type)
|
||||
#define PyContextVar_CheckExact(o) Py_IS_TYPE(o, &PyContextVar_Type)
|
||||
#define PyContextToken_CheckExact(o) Py_IS_TYPE(o, &PyContextToken_Type)
|
||||
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyContext_New(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue