]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-106320: Remove private _PyList functions (#108451)
authorVictor Stinner <vstinner@python.org>
Thu, 24 Aug 2023 19:44:34 +0000 (21:44 +0200)
committerGitHub <noreply@github.com>
Thu, 24 Aug 2023 19:44:34 +0000 (19:44 +0000)
Move private functions to the internal C API (pycore_list.h):

* _PyList_Extend()
* _PyList_DebugMallocStats()

No longer export these functions.

Include/cpython/listobject.h
Include/internal/pycore_list.h

index b3b23985de7a669b7c879d3d08d7ac3c6dec144b..661610548733fd141d492f6d8084e3fc459d253c 100644 (file)
@@ -21,9 +21,6 @@ typedef struct {
     Py_ssize_t allocated;
 } PyListObject;
 
-PyAPI_FUNC(PyObject *) _PyList_Extend(PyListObject *, PyObject *);
-PyAPI_FUNC(void) _PyList_DebugMallocStats(FILE *out);
-
 /* Cast argument to PyListObject* type. */
 #define _PyList_CAST(op) \
     (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op)))
index b2e503c87542bf3eaabab8b0a5fdc9b356c92737..056be2c80c8ce6f4dc5753e66f72543151778dcc 100644 (file)
@@ -8,7 +8,9 @@ extern "C" {
 #  error "this header requires Py_BUILD_CORE define"
 #endif
 
-#include "listobject.h"           // _PyList_CAST()
+
+extern PyObject* _PyList_Extend(PyListObject *, PyObject *);
+extern void _PyList_DebugMallocStats(FILE *out);
 
 
 /* runtime lifecycle */