Skip to content

Commit c3d580b

Browse files
authored
gh-106320: Remove private _PyList functions (#108451)
Move private functions to the internal C API (pycore_list.h): * _PyList_Extend() * _PyList_DebugMallocStats() No longer export these functions.
1 parent 88941d6 commit c3d580b

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Include/cpython/listobject.h

-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ typedef struct {
2121
Py_ssize_t allocated;
2222
} PyListObject;
2323

24-
PyAPI_FUNC(PyObject *) _PyList_Extend(PyListObject *, PyObject *);
25-
PyAPI_FUNC(void) _PyList_DebugMallocStats(FILE *out);
26-
2724
/* Cast argument to PyListObject* type. */
2825
#define _PyList_CAST(op) \
2926
(assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op)))

Include/internal/pycore_list.h

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

11-
#include "listobject.h" // _PyList_CAST()
11+
12+
extern PyObject* _PyList_Extend(PyListObject *, PyObject *);
13+
extern void _PyList_DebugMallocStats(FILE *out);
1214

1315

1416
/* runtime lifecycle */

0 commit comments

Comments
 (0)