summaryrefslogtreecommitdiff
path: root/Include/listobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/listobject.h')
-rw-r--r--Include/listobject.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/listobject.h b/Include/listobject.h
index 31843b5db0..6057279d51 100644
--- a/Include/listobject.h
+++ b/Include/listobject.h
@@ -71,7 +71,7 @@ PyAPI_FUNC(void) _PyList_DebugMallocStats(FILE *out);
#ifndef Py_LIMITED_API
#define PyList_GET_ITEM(op, i) (((PyListObject *)(op))->ob_item[i])
#define PyList_SET_ITEM(op, i, v) (((PyListObject *)(op))->ob_item[i] = (v))
-#define PyList_GET_SIZE(op) Py_SIZE(op)
+#define PyList_GET_SIZE(op) (assert(PyList_Check(op)),Py_SIZE(op))
#define _PyList_ITEMS(op) (((PyListObject *)(op))->ob_item)
#endif