16 #ifndef Py_LISTOBJECT_H
17 #define Py_LISTOBJECT_H
43 #define PyList_Check(op) \
44 PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS)
45 #define PyList_CheckExact(op) (Py_TYPE(op) == &PyList_Type)
50 PyAPI_FUNC(
int) PyList_SetItem(PyObject *, Py_ssize_t, PyObject *);
51 PyAPI_FUNC(
int) PyList_Insert(PyObject *, Py_ssize_t, PyObject *);
52 PyAPI_FUNC(
int) PyList_Append(PyObject *, PyObject *);
53 PyAPI_FUNC(PyObject *) PyList_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t);
54 PyAPI_FUNC(
int) PyList_SetSlice(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *);
57 PyAPI_FUNC(PyObject *) PyList_AsTuple(PyObject *);
61 #define PyList_GET_ITEM(op, i) (((PyListObject *)(op))->ob_item[i])
62 #define PyList_SET_ITEM(op, i, v) (((PyListObject *)(op))->ob_item[i] = (v))
63 #define PyList_GET_SIZE(op) Py_SIZE(op)