vidya7732/AI_Doctor_LLM_GenModel
0
1/* List object interface2 3 Another generally useful object type is a list of object pointers.4 This is a mutable type: the list items can be changed, and items can be5 added or removed. Out-of-range indices or non-list objects are ignored.6 7 WARNING: PyList_SetItem does not increment the new item's reference count,8 but does decrement the reference count of the item it replaces, if not nil.9 It does *decrement* the reference count if it is *not* inserted in the list.10 Similarly, PyList_GetItem does not increment the returned item's reference11 count.12*/13 14#ifndef Py_LISTOBJECT_H15#define Py_LISTOBJECT_H16#ifdef __cplusplus17extern "C" {18#endif19 20PyAPI_DATA(PyTypeObject) PyList_Type;21PyAPI_DATA(PyTypeObject) PyListIter_Type;22PyAPI_DATA(PyTypeObject) PyListRevIter_Type;23 24#define PyList_Check(op) \25 PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS)26#define PyList_CheckExact(op) Py_IS_TYPE(op, &PyList_Type)27 28PyAPI_FUNC(PyObject *) PyList_New(Py_ssize_t size);29PyAPI_FUNC(Py_ssize_t) PyList_Size(PyObject *);30 31PyAPI_FUNC(PyObject *) PyList_GetItem(PyObject *, Py_ssize_t);32PyAPI_FUNC(int) PyList_SetItem(PyObject *, Py_ssize_t, PyObject *);33PyAPI_FUNC(int) PyList_Insert(PyObject *, Py_ssize_t, PyObject *);34PyAPI_FUNC(int) PyList_Append(PyObject *, PyObject *);35 36PyAPI_FUNC(PyObject *) PyList_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t);37PyAPI_FUNC(int) PyList_SetSlice(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *);38 39PyAPI_FUNC(int) PyList_Sort(PyObject *);40PyAPI_FUNC(int) PyList_Reverse(PyObject *);41PyAPI_FUNC(PyObject *) PyList_AsTuple(PyObject *);42 43#ifndef Py_LIMITED_API44# define Py_CPYTHON_LISTOBJECT_H45# include "cpython/listobject.h"46# undef Py_CPYTHON_LISTOBJECT_H47#endif48 49#ifdef __cplusplus50}51#endif52#endif /* !Py_LISTOBJECT_H */53 