PHP 8.2.30
Preview: listobject.h Size: 1.73 KB
//opt/alt/python311/include/python3.11/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;

PyAPI_FUNC(PyObject *) _PyList_Extend(PyListObject *, PyObject *);
PyAPI_FUNC(void) _PyList_DebugMallocStats(FILE *out);

/* 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);
    return Py_SIZE(list);
}
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
#  define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op))
#endif

#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);
    list->ob_item[index] = value;
}
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
#define PyList_SET_ITEM(op, index, value) \
    PyList_SET_ITEM(_PyObject_CAST(op), index, _PyObject_CAST(value))
#endif

Directory Contents

Dirs: 0 × Files: 48

Name Size Perms Modified Actions
8.04 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
1.27 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
4.69 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
723 B lrw-r--r-- 2025-10-09 16:16:55
Edit Download
1.21 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
1.62 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
11.21 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
2.17 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
1.22 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
1.91 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
1.60 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
3.25 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
818 B lrw-r--r-- 2025-10-09 16:16:55
Edit Download
232 B lrw-r--r-- 2025-10-09 16:16:55
Edit Download
702 B lrw-r--r-- 2025-10-09 16:16:55
Edit Download
1.08 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
4.32 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
3.20 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
1.49 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
7.63 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
1.73 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
3.73 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
4.43 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
2.50 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
4.20 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
17.88 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
2.93 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
1.27 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
846 B lrw-r--r-- 2025-10-09 16:16:55
Edit Download
3.42 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
1.35 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
1.05 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
4.42 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
444 B lrw-r--r-- 2025-10-09 16:16:55
Edit Download
582 B lrw-r--r-- 2025-10-09 16:16:55
Edit Download
2.05 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
3.30 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
14.01 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
4.70 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
1.39 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
11.87 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
1.95 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
489 B lrw-r--r-- 2025-10-09 16:16:55
Edit Download
444 B lrw-r--r-- 2025-10-09 16:16:55
Edit Download
1.48 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
41.74 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download
560 B lrw-r--r-- 2025-10-09 16:16:55
Edit Download
2.05 KB lrw-r--r-- 2025-10-09 16:16:55
Edit Download

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