#include "Python.h"
#include "pycore_abstract.h"
#include "pycore_ceval.h"
#include "pycore_freelist.h"
#include "pycore_gc.h"
#include "pycore_initconfig.h"
#include "pycore_modsupport.h"
#include "pycore_object.h"
#include "clinic/tupleobject.c.h"
static inline int maybe_freelist_push(PyTupleObject *);
static PyTupleObject *
tuple_alloc(Py_ssize_t size)
{ … }
static inline PyObject *
tuple_get_empty(void)
{ … }
PyObject *
PyTuple_New(Py_ssize_t size)
{ … }
Py_ssize_t
PyTuple_Size(PyObject *op)
{ … }
PyObject *
PyTuple_GetItem(PyObject *op, Py_ssize_t i)
{ … }
int
PyTuple_SetItem(PyObject *op, Py_ssize_t i, PyObject *newitem)
{ … }
void
_PyTuple_MaybeUntrack(PyObject *op)
{ … }
PyObject *
PyTuple_Pack(Py_ssize_t n, ...)
{ … }
static void
tuple_dealloc(PyObject *self)
{ … }
static PyObject *
tuple_repr(PyObject *self)
{ … }
#if SIZEOF_PY_UHASH_T > 4
#define _PyHASH_XXPRIME_1 …
#define _PyHASH_XXPRIME_2 …
#define _PyHASH_XXPRIME_5 …
#define _PyHASH_XXROTATE(x) …
#else
#define _PyHASH_XXPRIME_1 …
#define _PyHASH_XXPRIME_2 …
#define _PyHASH_XXPRIME_5 …
#define _PyHASH_XXROTATE …
#endif
static Py_hash_t
tuple_hash(PyObject *op)
{ … }
static Py_ssize_t
tuple_length(PyObject *self)
{ … }
static int
tuple_contains(PyObject *self, PyObject *el)
{ … }
static PyObject *
tuple_item(PyObject *op, Py_ssize_t i)
{ … }
PyObject *
_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{ … }
PyObject *
_PyTuple_FromStackRefSteal(const _PyStackRef *src, Py_ssize_t n)
{ … }
PyObject *
_PyTuple_FromArraySteal(PyObject *const *src, Py_ssize_t n)
{ … }
static PyObject *
tuple_slice(PyTupleObject *a, Py_ssize_t ilow,
Py_ssize_t ihigh)
{ … }
PyObject *
PyTuple_GetSlice(PyObject *op, Py_ssize_t i, Py_ssize_t j)
{ … }
static PyObject *
tuple_concat(PyObject *aa, PyObject *bb)
{ … }
static PyObject *
tuple_repeat(PyObject *self, Py_ssize_t n)
{ … }
static PyObject *
tuple_index_impl(PyTupleObject *self, PyObject *value, Py_ssize_t start,
Py_ssize_t stop)
{ … }
static PyObject *
tuple_count(PyTupleObject *self, PyObject *value)
{ … }
static int
tuple_traverse(PyObject *self, visitproc visit, void *arg)
{ … }
static PyObject *
tuple_richcompare(PyObject *v, PyObject *w, int op)
{ … }
static PyObject *
tuple_subtype_new(PyTypeObject *type, PyObject *iterable);
static PyObject *
tuple_new_impl(PyTypeObject *type, PyObject *iterable)
{ … }
static PyObject *
tuple_vectorcall(PyObject *type, PyObject * const*args,
size_t nargsf, PyObject *kwnames)
{ … }
static PyObject *
tuple_subtype_new(PyTypeObject *type, PyObject *iterable)
{ … }
static PySequenceMethods tuple_as_sequence = …;
static PyObject*
tuple_subscript(PyObject *op, PyObject* item)
{ … }
static PyObject *
tuple___getnewargs___impl(PyTupleObject *self)
{ … }
static PyMethodDef tuple_methods[] = …;
static PyMappingMethods tuple_as_mapping = …;
static PyObject *tuple_iter(PyObject *seq);
PyTypeObject PyTuple_Type = …;
int
_PyTuple_Resize(PyObject **pv, Py_ssize_t newsize)
{ … }
static void
tupleiter_dealloc(_PyTupleIterObject *it)
{ … }
static int
tupleiter_traverse(_PyTupleIterObject *it, visitproc visit, void *arg)
{ … }
static PyObject *
tupleiter_next(PyObject *obj)
{ … }
static PyObject *
tupleiter_len(_PyTupleIterObject *it, PyObject *Py_UNUSED(ignored))
{ … }
PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");
static PyObject *
tupleiter_reduce(_PyTupleIterObject *it, PyObject *Py_UNUSED(ignored))
{ … }
static PyObject *
tupleiter_setstate(_PyTupleIterObject *it, PyObject *state)
{ … }
PyDoc_STRVAR(reduce_doc, "Return state information for pickling.");
PyDoc_STRVAR(setstate_doc, "Set state information for unpickling.");
static PyMethodDef tupleiter_methods[] = …;
PyTypeObject PyTupleIter_Type = …;
static PyObject *
tuple_iter(PyObject *seq)
{ … }
static inline int
maybe_freelist_push(PyTupleObject *op)
{ … }
void
_PyTuple_DebugMallocStats(FILE *out)
{ … }