From 1f2bd07aedaf656da01fea898753881f71c3c45d Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 6 Jan 1997 22:42:00 +0000 Subject: added PyList_GET_SIZE macro for both PyList_GET_SIZE and PyList_GET_ITEM, cast first argument to a PyListObject* --- Include/listobject.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Include/listobject.h b/Include/listobject.h index d72475e..c1bbcc1 100644 --- a/Include/listobject.h +++ b/Include/listobject.h @@ -73,7 +73,8 @@ extern int PyList_Reverse Py_PROTO((PyObject *)); extern PyObject *PyList_AsTuple Py_PROTO((PyObject *)); /* Macro, trading safety for speed */ -#define PyList_GET_ITEM(op, i) ((op)->ob_item[i]) +#define PyList_GET_ITEM(op, i) (((PyListObject *)(op))->ob_item[i]) +#define PyList_GET_SIZE(op) (((PyListObject *)(op))->ob_size) #ifdef __cplusplus } -- cgit v0.12