added PyList_GET_SIZE macro

for both PyList_GET_SIZE and PyList_GET_ITEM, cast first argument to a
PyListObject*
This commit is contained in:
Barry Warsaw 1997-01-06 22:42:00 +00:00
parent e0548b8da7
commit 1f2bd07aed
1 changed files with 2 additions and 1 deletions

View File

@ -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
}