#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
tupledealloc(PyTupleObject *op)
{ … }
static PyObject *
tuplerepr(PyTupleObject *v)
{ … }
#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
tuplehash(PyTupleObject *v)
{ … }
static Py_ssize_t
tuplelength(PyTupleObject *a)
{ … }
static int
tuplecontains(PyTupleObject *a, PyObject *el)
{ … }
static PyObject *
tupleitem(PyTupleObject *a, 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 *
tupleslice(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 *
tupleconcat(PyTupleObject *a, PyObject *bb)
{ … }
static PyObject *
tuplerepeat(PyTupleObject *a, 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
tupletraverse(PyTupleObject *o, visitproc visit, void *arg)
{ … }
static PyObject *
tuplerichcompare(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*
tuplesubscript(PyTupleObject* self, 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(_PyTupleIterObject *it)
{ … }
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)
{ … }