• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef Py_INTERNAL_TUPLE_H
2 #define Py_INTERNAL_TUPLE_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6 
7 #ifndef Py_BUILD_CORE
8 #  error "this header requires Py_BUILD_CORE define"
9 #endif
10 
11 extern void _PyTuple_MaybeUntrack(PyObject *);
12 extern void _PyTuple_DebugMallocStats(FILE *out);
13 
14 /* runtime lifecycle */
15 
16 extern PyStatus _PyTuple_InitGlobalObjects(PyInterpreterState *);
17 
18 
19 /* other API */
20 
21 #define _PyTuple_ITEMS(op) _Py_RVALUE(_PyTuple_CAST(op)->ob_item)
22 
23 extern PyObject *_PyTuple_FromArray(PyObject *const *, Py_ssize_t);
24 PyAPI_FUNC(PyObject *)_PyTuple_FromArraySteal(PyObject *const *, Py_ssize_t);
25 
26 typedef struct {
27     PyObject_HEAD
28     Py_ssize_t it_index;
29     PyTupleObject *it_seq; /* Set to NULL when iterator is exhausted */
30 } _PyTupleIterObject;
31 
32 #ifdef __cplusplus
33 }
34 #endif
35 #endif   /* !Py_INTERNAL_TUPLE_H */
36