]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-106320: Remove _PyTuple_MaybeUntrack() C API (#107143)
authorVictor Stinner <vstinner@python.org>
Sun, 23 Jul 2023 19:16:21 +0000 (21:16 +0200)
committerGitHub <noreply@github.com>
Sun, 23 Jul 2023 19:16:21 +0000 (19:16 +0000)
Move _PyTuple_MaybeUntrack() and _PyTuple_DebugMallocStats() functions
to the internal C API (pycore_tuple.h). No longer export these functions.

Include/cpython/tupleobject.h
Include/internal/pycore_tuple.h

index 370da1612a61ed4cc61bf59232b23d812bcc8fb8..e530c8beda44ab3b409948001085d90c21709312 100644 (file)
@@ -11,7 +11,6 @@ typedef struct {
 } PyTupleObject;
 
 PyAPI_FUNC(int) _PyTuple_Resize(PyObject **, Py_ssize_t);
-PyAPI_FUNC(void) _PyTuple_MaybeUntrack(PyObject *);
 
 /* Cast argument to PyTupleObject* type. */
 #define _PyTuple_CAST(op) \
@@ -37,5 +36,3 @@ PyTuple_SET_ITEM(PyObject *op, Py_ssize_t index, PyObject *value) {
 }
 #define PyTuple_SET_ITEM(op, index, value) \
     PyTuple_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value))
-
-PyAPI_FUNC(void) _PyTuple_DebugMallocStats(FILE *out);
index 335edad89792c3257d8bfa64dd2ee338ff934a61..4fa7a12206bcb21bc611ed77c2789f5a18000210 100644 (file)
@@ -8,8 +8,8 @@ extern "C" {
 #  error "this header requires Py_BUILD_CORE define"
 #endif
 
-#include "tupleobject.h"   /* _PyTuple_CAST() */
-
+extern void _PyTuple_MaybeUntrack(PyObject *);
+extern void _PyTuple_DebugMallocStats(FILE *out);
 
 /* runtime lifecycle */