4 #ifndef Py_TUPLEOBJECT_H
5 #define Py_TUPLEOBJECT_H
36 #define PyTuple_Check(op) \
37 PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_TUPLE_SUBCLASS)
38 #define PyTuple_CheckExact(op) (Py_TYPE(op) == &PyTuple_Type)
43 PyAPI_FUNC(
int) PyTuple_SetItem(PyObject *, Py_ssize_t, PyObject *);
44 PyAPI_FUNC(PyObject *) PyTuple_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t);
45 PyAPI_FUNC(
int) _PyTuple_Resize(PyObject **, Py_ssize_t);
46 PyAPI_FUNC(PyObject *) PyTuple_Pack(Py_ssize_t, ...);
47 PyAPI_FUNC(
void) _PyTuple_MaybeUntrack(PyObject *);
50 #define PyTuple_GET_ITEM(op, i) (((PyTupleObject *)(op))->ob_item[i])
51 #define PyTuple_GET_SIZE(op) Py_SIZE(op)
54 #define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject *)(op))->ob_item[i] = v)