summaryrefslogtreecommitdiff
path: root/Include/tupleobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/tupleobject.h')
-rw-r--r--Include/tupleobject.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Include/tupleobject.h b/Include/tupleobject.h
index 19fe7a53a5..f17b7882be 100644
--- a/Include/tupleobject.h
+++ b/Include/tupleobject.h
@@ -21,6 +21,7 @@ inserted in the tuple. Similarly, PyTuple_GetItem does not increment the
returned item's reference count.
*/
+#ifndef Py_LIMITED_API
typedef struct {
PyObject_VAR_HEAD
PyObject *ob_item[1];
@@ -30,6 +31,7 @@ typedef struct {
* the tuple is not yet visible outside the function that builds it.
*/
} PyTupleObject;
+#endif
PyAPI_DATA(PyTypeObject) PyTuple_Type;
PyAPI_DATA(PyTypeObject) PyTupleIter_Type;
@@ -43,16 +45,22 @@ PyAPI_FUNC(Py_ssize_t) PyTuple_Size(PyObject *);
PyAPI_FUNC(PyObject *) PyTuple_GetItem(PyObject *, Py_ssize_t);
PyAPI_FUNC(int) PyTuple_SetItem(PyObject *, Py_ssize_t, PyObject *);
PyAPI_FUNC(PyObject *) PyTuple_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t);
+#ifndef Py_LIMITED_API
PyAPI_FUNC(int) _PyTuple_Resize(PyObject **, Py_ssize_t);
+#endif
PyAPI_FUNC(PyObject *) PyTuple_Pack(Py_ssize_t, ...);
+#ifndef Py_LIMITED_API
PyAPI_FUNC(void) _PyTuple_MaybeUntrack(PyObject *);
+#endif
/* Macro, trading safety for speed */
+#ifndef Py_LIMITED_API
#define PyTuple_GET_ITEM(op, i) (((PyTupleObject *)(op))->ob_item[i])
#define PyTuple_GET_SIZE(op) Py_SIZE(op)
/* Macro, *only* to be used to fill in brand new tuples */
#define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject *)(op))->ob_item[i] = v)
+#endif
PyAPI_FUNC(int) PyTuple_ClearFreeList(void);