mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +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
|
@ -115,7 +115,7 @@ typedef struct {
|
|||
|
||||
PyAPI_DATA(PyTypeObject) PyCode_Type;
|
||||
|
||||
#define PyCode_Check(op) (Py_TYPE(op) == &PyCode_Type)
|
||||
#define PyCode_Check(op) Py_IS_TYPE(op, &PyCode_Type)
|
||||
#define PyCode_GetNumFree(op) (PyTuple_GET_SIZE((op)->co_freevars))
|
||||
|
||||
/* Public interface */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue