vidya7732/AI_Doctor_LLM_GenModel
0
1/* Tuple object interface */2 3#ifndef Py_TUPLEOBJECT_H4#define Py_TUPLEOBJECT_H5#ifdef __cplusplus6extern "C" {7#endif8 9/*10Another generally useful object type is a tuple of object pointers.11For Python, this is an immutable type. C code can change the tuple items12(but not their number), and even use tuples as general-purpose arrays of13object references, but in general only brand new tuples should be mutated,14not ones that might already have been exposed to Python code.15 16*** WARNING *** PyTuple_SetItem does not increment the new item's reference17count, but does decrement the reference count of the item it replaces,18if not nil. It does *decrement* the reference count if it is *not*19inserted in the tuple. Similarly, PyTuple_GetItem does not increment the20returned item's reference count.21*/22 23PyAPI_DATA(PyTypeObject) PyTuple_Type;24PyAPI_DATA(PyTypeObject) PyTupleIter_Type;25 26#define PyTuple_Check(op) \27 PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_TUPLE_SUBCLASS)28#define PyTuple_CheckExact(op) Py_IS_TYPE(op, &PyTuple_Type)29 30PyAPI_FUNC(PyObject *) PyTuple_New(Py_ssize_t size);31PyAPI_FUNC(Py_ssize_t) PyTuple_Size(PyObject *);32PyAPI_FUNC(PyObject *) PyTuple_GetItem(PyObject *, Py_ssize_t);33PyAPI_FUNC(int) PyTuple_SetItem(PyObject *, Py_ssize_t, PyObject *);34PyAPI_FUNC(PyObject *) PyTuple_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t);35PyAPI_FUNC(PyObject *) PyTuple_Pack(Py_ssize_t, ...);36 37#ifndef Py_LIMITED_API38# define Py_CPYTHON_TUPLEOBJECT_H39# include "cpython/tupleobject.h"40# undef Py_CPYTHON_TUPLEOBJECT_H41#endif42 43#ifdef __cplusplus44}45#endif46#endif /* !Py_TUPLEOBJECT_H */47 