summaryrefslogtreecommitdiffstats
path: root/Include/listobject.h
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-10-05 20:41:38 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-10-05 20:41:38 (GMT)
commitb1c469843ff56e1704108324bce3ebb87aa753a6 (patch)
tree860387955d4ba06ef9ff5064ea78ea20aa00f4ba /Include/listobject.h
parente138f369e65cef61740341cbf73d5f2c29d14a5b (diff)
downloadcpython-b1c469843ff56e1704108324bce3ebb87aa753a6.zip
cpython-b1c469843ff56e1704108324bce3ebb87aa753a6.tar.gz
cpython-b1c469843ff56e1704108324bce3ebb87aa753a6.tar.bz2
Introduced the oddly-missing PyList_CheckExact(), and used it to replace
a hard-coded type check.
Diffstat (limited to 'Include/listobject.h')
-rw-r--r--Include/listobject.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/listobject.h b/Include/listobject.h
index af1368c..1befe86 100644
--- a/Include/listobject.h
+++ b/Include/listobject.h
@@ -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 *);