PHP 8.2.30
Preview: listobject.h Size: 1.76 KB
//proc/self/root/opt/alt/python313/include/python3.13/cpython/listobject.h

#ifndef Py_CPYTHON_LISTOBJECT_H
#  error "this header file must not be included directly"
#endif

typedef struct {
    PyObject_VAR_HEAD
    /* Vector of pointers to list elements.  list[0] is ob_item[0], etc. */
    PyObject **ob_item;

    /* 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.
     *
     * Items must normally not be NULL, except during construction when
     * the list is not yet visible outside the function that builds it.
     */
    Py_ssize_t allocated;
} PyListObject;

/* Cast argument to PyListObject* type. */
#define _PyList_CAST(op) \
    (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op)))

// Macros and static inline functions, trading safety for speed

static inline Py_ssize_t PyList_GET_SIZE(PyObject *op) {
    PyListObject *list = _PyList_CAST(op);
#ifdef Py_GIL_DISABLED
    return _Py_atomic_load_ssize_relaxed(&(_PyVarObject_CAST(list)->ob_size));
#else
    return Py_SIZE(list);
#endif
}
#define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op))

#define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)])

static inline void
PyList_SET_ITEM(PyObject *op, Py_ssize_t index, PyObject *value) {
    PyListObject *list = _PyList_CAST(op);
    assert(0 <= index);
    assert(index < list->allocated);
    list->ob_item[index] = value;
}
#define PyList_SET_ITEM(op, index, value) \
    PyList_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value))

PyAPI_FUNC(int) PyList_Extend(PyObject *self, PyObject *iterable);
PyAPI_FUNC(int) PyList_Clear(PyObject *self);

Directory Contents

Dirs: 0 × Files: 59

Name Size Perms Modified Actions
3.32 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.14 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.15 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.05 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.09 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.19 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
14.85 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.07 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
909 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.79 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
5.46 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.56 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
3.78 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
652 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
232 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
900 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.17 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
6.88 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.93 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
725 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
8.00 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.76 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.72 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
5.00 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
5.45 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.17 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.22 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.02 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
7.52 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
18.63 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
3.73 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.28 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
848 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
3.83 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
16.12 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
18.68 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
28.56 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
23.77 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.35 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.38 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.84 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
444 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.90 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.35 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.75 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.78 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
9.24 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
5.31 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
4.23 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.47 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
707 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.00 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
775 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
282 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
823 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.30 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
24.49 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
564 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.20 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).