deimos.python.listobject

Mirror listobject.h

Another generally useful object type is an list of object pointers. This is a mutable type: the list items can be changed, and items can be added or removed. Out-of-range indices or non-list objects are ignored.

Members

Functions

PyList_Append
int PyList_Append(PyObject* , PyObject* )

_

PyList_AsTuple
PyObject* PyList_AsTuple(PyObject* )

_

PyList_Check
int PyList_Check(PyObject* op)

_

PyList_CheckExact
int PyList_CheckExact(PyObject* op)

_

PyList_GET_ITEM
PyObject_BorrowedRef* PyList_GET_ITEM(PyObject* op, Py_ssize_t i)

_

PyList_GET_SIZE
Py_ssize_t PyList_GET_SIZE(PyObject* op)

_

PyList_GetItem
PyObject_BorrowedRef* PyList_GetItem(PyObject* , Py_ssize_t )

WARNING: PyList_SetItem does not increment the new item's reference count, but does decrement the reference count of the item it replaces, if not nil. It does *decrement* the reference count if it is *not* inserted in the list. Similarly, PyList_GetItem does not increment the returned item's reference count.

PyList_GetSlice
PyObject* PyList_GetSlice(PyObject* , Py_ssize_t , Py_ssize_t )

_

PyList_Insert
int PyList_Insert(PyObject* , Py_ssize_t , PyObject* )

_

PyList_New
PyObject* PyList_New(Py_ssize_t size)

_

PyList_Reverse
int PyList_Reverse(PyObject* )

_

PyList_SET_ITEM
void PyList_SET_ITEM(PyObject* op, Py_ssize_t i, PyObject* v)

_

PyList_SetItem
int PyList_SetItem(PyObject* , Py_ssize_t , PyObject* )

WARNING: PyList_SetItem does not increment the new item's reference count, but does decrement the reference count of the item it replaces, if not nil. It does *decrement* the reference count if it is *not* inserted in the list. Similarly, PyList_GetItem does not increment the returned item's reference count.

PyList_SetSlice
int PyList_SetSlice(PyObject* , Py_ssize_t , Py_ssize_t , PyObject* )

_

PyList_Size
Py_ssize_t PyList_Size(PyObject* )

_

PyList_Sort
int PyList_Sort(PyObject* )

_

Structs

PyListObject
struct PyListObject

ob_item contains space for 'allocated' elements. The number currently in use is ob_size. Invariants: 0 <= ob_size <= allocated len(list) == ob_size ob_item == NULL implies ob_size == allocated == 0 list.sort() temporarily sets allocated to -1 to detect mutations.

Meta