Skip to content

Commit 0810b0c

Browse files
authored
gh-106320: Remove _PyTuple_MaybeUntrack() C API (#107143)
Move _PyTuple_MaybeUntrack() and _PyTuple_DebugMallocStats() functions to the internal C API (pycore_tuple.h). No longer export these functions.
1 parent adb27ea commit 0810b0c

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Diff for: Include/cpython/tupleobject.h

-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ typedef struct {
1111
} PyTupleObject;
1212

1313
PyAPI_FUNC(int) _PyTuple_Resize(PyObject **, Py_ssize_t);
14-
PyAPI_FUNC(void) _PyTuple_MaybeUntrack(PyObject *);
1514

1615
/* Cast argument to PyTupleObject* type. */
1716
#define _PyTuple_CAST(op) \
@@ -37,5 +36,3 @@ PyTuple_SET_ITEM(PyObject *op, Py_ssize_t index, PyObject *value) {
3736
}
3837
#define PyTuple_SET_ITEM(op, index, value) \
3938
PyTuple_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value))
40-
41-
PyAPI_FUNC(void) _PyTuple_DebugMallocStats(FILE *out);

Diff for: Include/internal/pycore_tuple.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11-
#include "tupleobject.h" /* _PyTuple_CAST() */
12-
11+
extern void _PyTuple_MaybeUntrack(PyObject *);
12+
extern void _PyTuple_DebugMallocStats(FILE *out);
1313

1414
/* runtime lifecycle */
1515

0 commit comments

Comments
 (0)