#include "Python.h"
#include "pycore_initconfig.h"
#include "pycore_modsupport.h"
#include "pycore_object.h"
#include "pycore_structseq.h"
#include "pycore_tuple.h"
static const char visible_length_key[] = …;
static const char real_length_key[] = …;
static const char unnamed_fields_key[] = …;
static const char match_args_key[] = …;
const char * const PyStructSequence_UnnamedField = …;
static Py_ssize_t
get_type_attr_as_size(PyTypeObject *tp, PyObject *name)
{ … }
#define VISIBLE_SIZE(op) …
#define VISIBLE_SIZE_TP(tp) …
#define REAL_SIZE_TP(tp) …
#define REAL_SIZE(op) …
#define UNNAMED_FIELDS_TP(tp) …
#define UNNAMED_FIELDS(op) …
static Py_ssize_t
get_real_size(PyObject *op)
{ … }
PyObject *
PyStructSequence_New(PyTypeObject *type)
{ … }
void
PyStructSequence_SetItem(PyObject *op, Py_ssize_t index, PyObject *value)
{ … }
PyObject*
PyStructSequence_GetItem(PyObject *op, Py_ssize_t index)
{ … }
static int
structseq_traverse(PyStructSequence *obj, visitproc visit, void *arg)
{ … }
static void
structseq_dealloc(PyStructSequence *obj)
{ … }
#include "clinic/structseq.c.h"
static PyObject *
structseq_new_impl(PyTypeObject *type, PyObject *arg, PyObject *dict)
{ … }
static PyObject *
structseq_repr(PyStructSequence *obj)
{ … }
static PyObject *
structseq_reduce(PyStructSequence* self, PyObject *Py_UNUSED(ignored))
{ … }
static PyObject *
structseq_replace(PyStructSequence *self, PyObject *args, PyObject *kwargs)
{ … }
static PyMethodDef structseq_methods[] = …;
static Py_ssize_t
count_members(PyStructSequence_Desc *desc, Py_ssize_t *n_unnamed_members) { … }
static int
initialize_structseq_dict(PyStructSequence_Desc *desc, PyObject* dict,
Py_ssize_t n_members, Py_ssize_t n_unnamed_members) { … }
static PyMemberDef *
initialize_members(PyStructSequence_Desc *desc,
Py_ssize_t n_members, Py_ssize_t n_unnamed_members)
{ … }
static void
initialize_static_fields(PyTypeObject *type, PyStructSequence_Desc *desc,
PyMemberDef *tp_members, Py_ssize_t n_members,
unsigned long tp_flags)
{ … }
static int
initialize_static_type(PyTypeObject *type, PyStructSequence_Desc *desc,
Py_ssize_t n_members, Py_ssize_t n_unnamed_members) { … }
int
_PyStructSequence_InitBuiltinWithFlags(PyInterpreterState *interp,
PyTypeObject *type,
PyStructSequence_Desc *desc,
unsigned long tp_flags)
{ … }
int
PyStructSequence_InitType2(PyTypeObject *type, PyStructSequence_Desc *desc)
{ … }
void
PyStructSequence_InitType(PyTypeObject *type, PyStructSequence_Desc *desc)
{ … }
void
_PyStructSequence_FiniBuiltin(PyInterpreterState *interp, PyTypeObject *type)
{ … }
PyTypeObject *
_PyStructSequence_NewType(PyStructSequence_Desc *desc, unsigned long tp_flags)
{ … }
PyTypeObject *
PyStructSequence_NewType(PyStructSequence_Desc *desc)
{ … }