File indexing completed on 2025-01-18 10:06:49
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef Py_LISTOBJECT_H
0015 #define Py_LISTOBJECT_H
0016 #ifdef __cplusplus
0017 extern "C" {
0018 #endif
0019
0020 PyAPI_DATA(PyTypeObject) PyList_Type;
0021 PyAPI_DATA(PyTypeObject) PyListIter_Type;
0022 PyAPI_DATA(PyTypeObject) PyListRevIter_Type;
0023
0024 #define PyList_Check(op) \
0025 PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS)
0026 #define PyList_CheckExact(op) Py_IS_TYPE((op), &PyList_Type)
0027
0028 PyAPI_FUNC(PyObject *) PyList_New(Py_ssize_t size);
0029 PyAPI_FUNC(Py_ssize_t) PyList_Size(PyObject *);
0030
0031 PyAPI_FUNC(PyObject *) PyList_GetItem(PyObject *, Py_ssize_t);
0032 PyAPI_FUNC(int) PyList_SetItem(PyObject *, Py_ssize_t, PyObject *);
0033 PyAPI_FUNC(int) PyList_Insert(PyObject *, Py_ssize_t, PyObject *);
0034 PyAPI_FUNC(int) PyList_Append(PyObject *, PyObject *);
0035
0036 PyAPI_FUNC(PyObject *) PyList_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t);
0037 PyAPI_FUNC(int) PyList_SetSlice(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *);
0038
0039 PyAPI_FUNC(int) PyList_Sort(PyObject *);
0040 PyAPI_FUNC(int) PyList_Reverse(PyObject *);
0041 PyAPI_FUNC(PyObject *) PyList_AsTuple(PyObject *);
0042
0043 #ifndef Py_LIMITED_API
0044 # define Py_CPYTHON_LISTOBJECT_H
0045 # include "cpython/listobject.h"
0046 # undef Py_CPYTHON_LISTOBJECT_H
0047 #endif
0048
0049 #ifdef __cplusplus
0050 }
0051 #endif
0052 #endif