Skip to content

Commit cd7db76

Browse files
authored
bpo-39372: Clean header files of declared interfaces with no implementations (pythonGH-18037)
The public API symbols being removed are: _PyBytes_InsertThousandsGroupingLocale, _PyBytes_InsertThousandsGrouping, _Py_InitializeFromArgs, _Py_InitializeFromWideArgs, _PyFloat_Repr, _PyFloat_Digits, _PyFloat_DigitsInit, PyFrame_ExtendStack, _PyAIterWrapper_Type, PyNullImporter_Type, PyCmpWrapper_Type, PySortWrapper_Type, PyNoArgsFunction.
1 parent 6aabb63 commit cd7db76

File tree

17 files changed

+8
-67
lines changed

17 files changed

+8
-67
lines changed

Include/bytesobject.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -106,28 +106,6 @@ PyAPI_FUNC(int) PyBytes_AsStringAndSize(
106106
strings) */
107107
);
108108

109-
/* Using the current locale, insert the thousands grouping
110-
into the string pointed to by buffer. For the argument descriptions,
111-
see Objects/stringlib/localeutil.h */
112-
#ifndef Py_LIMITED_API
113-
PyAPI_FUNC(Py_ssize_t) _PyBytes_InsertThousandsGroupingLocale(char *buffer,
114-
Py_ssize_t n_buffer,
115-
char *digits,
116-
Py_ssize_t n_digits,
117-
Py_ssize_t min_width);
118-
119-
/* Using explicit passed-in values, insert the thousands grouping
120-
into the string pointed to by buffer. For the argument descriptions,
121-
see Objects/stringlib/localeutil.h */
122-
PyAPI_FUNC(Py_ssize_t) _PyBytes_InsertThousandsGrouping(char *buffer,
123-
Py_ssize_t n_buffer,
124-
char *digits,
125-
Py_ssize_t n_digits,
126-
Py_ssize_t min_width,
127-
const char *grouping,
128-
const char *thousands_sep);
129-
#endif
130-
131109
/* Flags used by string formatting */
132110
#define F_LJUST (1<<0)
133111
#define F_SIGN (1<<1)

Include/cpython/pylifecycle.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ PyAPI_FUNC(int) _Py_IsCoreInitialized(void);
3232

3333
PyAPI_FUNC(PyStatus) Py_InitializeFromConfig(
3434
const PyConfig *config);
35-
PyAPI_FUNC(PyStatus) _Py_InitializeFromArgs(
36-
const PyConfig *config,
37-
Py_ssize_t argc,
38-
char * const *argv);
39-
PyAPI_FUNC(PyStatus) _Py_InitializeFromWideArgs(
40-
const PyConfig *config,
41-
Py_ssize_t argc,
42-
wchar_t * const *argv);
4335
PyAPI_FUNC(PyStatus) _Py_InitializeMain(void);
4436

4537
PyAPI_FUNC(int) Py_RunMain(void);

Include/floatobject.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,6 @@ PyAPI_FUNC(int) _PyFloat_Pack2(double x, unsigned char *p, int le);
8888
PyAPI_FUNC(int) _PyFloat_Pack4(double x, unsigned char *p, int le);
8989
PyAPI_FUNC(int) _PyFloat_Pack8(double x, unsigned char *p, int le);
9090

91-
/* Needed for the old way for marshal to store a floating point number.
92-
Returns the string length copied into p, -1 on error.
93-
*/
94-
PyAPI_FUNC(int) _PyFloat_Repr(double x, char *p, size_t len);
95-
96-
/* Used to get the important decimal digits of a double */
97-
PyAPI_FUNC(int) _PyFloat_Digits(char *buf, double v, int *signum);
98-
PyAPI_FUNC(void) _PyFloat_DigitsInit(void);
99-
10091
/* The unpack routines read 2, 4 or 8 bytes, starting at p. le is a bool
10192
* argument, true if the string is in little-endian format (exponent
10293
* last, at p+1, p+3 or p+7), false if big-endian (exponent first, at p).

Include/frameobject.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ PyFrameObject* _PyFrame_New_NoTrack(PyThreadState *, PyCodeObject *,
6767
PyAPI_FUNC(void) PyFrame_BlockSetup(PyFrameObject *, int, int, int);
6868
PyAPI_FUNC(PyTryBlock *) PyFrame_BlockPop(PyFrameObject *);
6969

70-
/* Extend the value stack */
71-
72-
PyAPI_FUNC(PyObject **) PyFrame_ExtendStack(PyFrameObject *, int, int);
73-
7470
/* Conversions between "fast locals" and locals in dictionary */
7571

7672
PyAPI_FUNC(void) PyFrame_LocalsToFast(PyFrameObject *, int);

Include/genobject.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ typedef struct {
5858
PyAPI_DATA(PyTypeObject) PyCoro_Type;
5959
PyAPI_DATA(PyTypeObject) _PyCoroWrapper_Type;
6060

61-
PyAPI_DATA(PyTypeObject) _PyAIterWrapper_Type;
62-
6361
#define PyCoro_CheckExact(op) (Py_TYPE(op) == &PyCoro_Type)
6462
PyObject *_PyCoro_GetAwaitableIter(PyObject *o);
6563
PyAPI_FUNC(PyObject *) PyCoro_New(struct _frame *,

Include/import.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ PyAPI_FUNC(int) PyImport_ImportFrozenModule(
8181
const char *name /* UTF-8 encoded string */
8282
);
8383

84-
PyAPI_DATA(PyTypeObject) PyNullImporter_Type;
85-
8684
PyAPI_FUNC(int) PyImport_AppendInittab(
8785
const char *name, /* ASCII encoded string */
8886
PyObject* (*initfunc)(void)

Include/internal/pycore_pathconfig.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ PyAPI_DATA(wchar_t*) _Py_dll_path;
4747
#endif
4848

4949
extern void _PyPathConfig_ClearGlobal(void);
50-
extern PyStatus _PyPathConfig_SetGlobal(
51-
const struct _PyPathConfig *pathconfig);
5250

5351
extern PyStatus _PyPathConfig_Calculate(
5452
_PyPathConfig *pathconfig,

Include/iterobject.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ extern "C" {
77

88
PyAPI_DATA(PyTypeObject) PySeqIter_Type;
99
PyAPI_DATA(PyTypeObject) PyCallIter_Type;
10-
PyAPI_DATA(PyTypeObject) PyCmpWrapper_Type;
1110

1211
#define PySeqIter_Check(op) (Py_TYPE(op) == &PySeqIter_Type)
1312

Include/listobject.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ typedef struct {
4343
PyAPI_DATA(PyTypeObject) PyList_Type;
4444
PyAPI_DATA(PyTypeObject) PyListIter_Type;
4545
PyAPI_DATA(PyTypeObject) PyListRevIter_Type;
46-
PyAPI_DATA(PyTypeObject) PySortWrapper_Type;
4746

4847
#define PyList_Check(op) \
4948
PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS)

Include/methodobject.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *,
2222
typedef PyObject *(*_PyCFunctionFastWithKeywords) (PyObject *,
2323
PyObject *const *, Py_ssize_t,
2424
PyObject *);
25-
typedef PyObject *(*PyNoArgsFunction)(PyObject *);
26-
2725
PyAPI_FUNC(PyCFunction) PyCFunction_GetFunction(PyObject *);
2826
PyAPI_FUNC(PyObject *) PyCFunction_GetSelf(PyObject *);
2927
PyAPI_FUNC(int) PyCFunction_GetFlags(PyObject *);

0 commit comments

Comments
 (0)