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:
parent
e0548b8da7
commit
1f2bd07aed
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue