mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Introduced the oddly-missing PyList_CheckExact(), and used it to replace
a hard-coded type check.
This commit is contained in:
parent
e138f369e6
commit
b1c469843f
2 changed files with 2 additions and 1 deletions
|
@ -27,6 +27,7 @@ typedef struct {
|
|||
extern DL_IMPORT(PyTypeObject) PyList_Type;
|
||||
|
||||
#define PyList_Check(op) PyObject_TypeCheck(op, &PyList_Type)
|
||||
#define PyList_CheckExact(op) ((op)->ob_type == &PyList_Type)
|
||||
|
||||
extern DL_IMPORT(PyObject *) PyList_New(int size);
|
||||
extern DL_IMPORT(int) PyList_Size(PyObject *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue