]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39372: Clean header files of declared interfaces with no implementations (GH...
authorPablo Galindo <Pablogsal@gmail.com>
Sat, 18 Jan 2020 03:14:59 +0000 (03:14 +0000)
committerGitHub <noreply@github.com>
Sat, 18 Jan 2020 03:14:59 +0000 (03:14 +0000)
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.

17 files changed:
Include/bytesobject.h
Include/cpython/pylifecycle.h
Include/floatobject.h
Include/frameobject.h
Include/genobject.h
Include/import.h
Include/internal/pycore_pathconfig.h
Include/iterobject.h
Include/listobject.h
Include/methodobject.h
Include/pythread.h
Misc/NEWS.d/next/C API/2020-01-17-19-25-48.bpo-39372.hGJMY6.rst [new file with mode: 0644]
Objects/stringlib/asciilib.h
Objects/stringlib/ucs1lib.h
Objects/stringlib/ucs2lib.h
Objects/stringlib/ucs4lib.h
Objects/stringlib/undef.h

index fc9981e56d277416da6828635d3e8f0ad8037fb2..4aaa71a832bd78b5e41bf27349c278679216ba3a 100644 (file)
@@ -106,28 +106,6 @@ PyAPI_FUNC(int) PyBytes_AsStringAndSize(
                            strings) */
     );
 
-/* Using the current locale, insert the thousands grouping
-   into the string pointed to by buffer.  For the argument descriptions,
-   see Objects/stringlib/localeutil.h */
-#ifndef Py_LIMITED_API
-PyAPI_FUNC(Py_ssize_t) _PyBytes_InsertThousandsGroupingLocale(char *buffer,
-                                                   Py_ssize_t n_buffer,
-                                                   char *digits,
-                                                   Py_ssize_t n_digits,
-                                                   Py_ssize_t min_width);
-
-/* Using explicit passed-in values, insert the thousands grouping
-   into the string pointed to by buffer.  For the argument descriptions,
-   see Objects/stringlib/localeutil.h */
-PyAPI_FUNC(Py_ssize_t) _PyBytes_InsertThousandsGrouping(char *buffer,
-                                                   Py_ssize_t n_buffer,
-                                                   char *digits,
-                                                   Py_ssize_t n_digits,
-                                                   Py_ssize_t min_width,
-                                                   const char *grouping,
-                                                   const char *thousands_sep);
-#endif
-
 /* Flags used by string formatting */
 #define F_LJUST (1<<0)
 #define F_SIGN  (1<<1)
index 2f3a0dbdfe64c52f3dcc29c04654628baaf0a146..a01e9c94f12d75f150336419e561373cd47a7e66 100644 (file)
@@ -32,14 +32,6 @@ PyAPI_FUNC(int) _Py_IsCoreInitialized(void);
 
 PyAPI_FUNC(PyStatus) Py_InitializeFromConfig(
     const PyConfig *config);
-PyAPI_FUNC(PyStatus) _Py_InitializeFromArgs(
-    const PyConfig *config,
-    Py_ssize_t argc,
-    char * const *argv);
-PyAPI_FUNC(PyStatus) _Py_InitializeFromWideArgs(
-    const PyConfig *config,
-    Py_ssize_t argc,
-    wchar_t * const *argv);
 PyAPI_FUNC(PyStatus) _Py_InitializeMain(void);
 
 PyAPI_FUNC(int) Py_RunMain(void);
index f1044d64cba84d3d328d3485431f103cf2a2b3fe..0fb9fc4e0fae7567d557ad3fe0f5e0c60f5c07e2 100644 (file)
@@ -88,15 +88,6 @@ PyAPI_FUNC(int) _PyFloat_Pack2(double x, unsigned char *p, int le);
 PyAPI_FUNC(int) _PyFloat_Pack4(double x, unsigned char *p, int le);
 PyAPI_FUNC(int) _PyFloat_Pack8(double x, unsigned char *p, int le);
 
-/* Needed for the old way for marshal to store a floating point number.
-   Returns the string length copied into p, -1 on error.
- */
-PyAPI_FUNC(int) _PyFloat_Repr(double x, char *p, size_t len);
-
-/* Used to get the important decimal digits of a double */
-PyAPI_FUNC(int) _PyFloat_Digits(char *buf, double v, int *signum);
-PyAPI_FUNC(void) _PyFloat_DigitsInit(void);
-
 /* The unpack routines read 2, 4 or 8 bytes, starting at p.  le is a bool
  * argument, true if the string is in little-endian format (exponent
  * last, at p+1, p+3 or p+7), false if big-endian (exponent first, at p).
index 3bad86a66f752df021975714a208088d0fba00ad..ddcf1591aaea7a7cfd7d61a81e6683ebf489f68f 100644 (file)
@@ -67,10 +67,6 @@ PyFrameObject* _PyFrame_New_NoTrack(PyThreadState *, PyCodeObject *,
 PyAPI_FUNC(void) PyFrame_BlockSetup(PyFrameObject *, int, int, int);
 PyAPI_FUNC(PyTryBlock *) PyFrame_BlockPop(PyFrameObject *);
 
-/* Extend the value stack */
-
-PyAPI_FUNC(PyObject **) PyFrame_ExtendStack(PyFrameObject *, int, int);
-
 /* Conversions between "fast locals" and locals in dictionary */
 
 PyAPI_FUNC(void) PyFrame_LocalsToFast(PyFrameObject *, int);
index 96f8dcc74d8ce28654bb724fc4f0b4b3c5d648dc..5ee9a2831d12bf77e1d66696002bfb4c02e33e65 100644 (file)
@@ -58,8 +58,6 @@ typedef struct {
 PyAPI_DATA(PyTypeObject) PyCoro_Type;
 PyAPI_DATA(PyTypeObject) _PyCoroWrapper_Type;
 
-PyAPI_DATA(PyTypeObject) _PyAIterWrapper_Type;
-
 #define PyCoro_CheckExact(op) (Py_TYPE(op) == &PyCoro_Type)
 PyObject *_PyCoro_GetAwaitableIter(PyObject *o);
 PyAPI_FUNC(PyObject *) PyCoro_New(struct _frame *,
index 735533ee7a79ac17655148a2b441f73376fbfaaa..aeef3efd0bcee8e20183c91c41c1cda50ff7888f 100644 (file)
@@ -81,8 +81,6 @@ PyAPI_FUNC(int) PyImport_ImportFrozenModule(
     const char *name            /* UTF-8 encoded string */
     );
 
-PyAPI_DATA(PyTypeObject) PyNullImporter_Type;
-
 PyAPI_FUNC(int) PyImport_AppendInittab(
     const char *name,           /* ASCII encoded string */
     PyObject* (*initfunc)(void)
index 257c056a77d0dc2efd12acd727c737f3668b90b5..42d61b1ca26bdfd0d6715192383271591e796f11 100644 (file)
@@ -47,8 +47,6 @@ PyAPI_DATA(wchar_t*) _Py_dll_path;
 #endif
 
 extern void _PyPathConfig_ClearGlobal(void);
-extern PyStatus _PyPathConfig_SetGlobal(
-    const struct _PyPathConfig *pathconfig);
 
 extern PyStatus _PyPathConfig_Calculate(
     _PyPathConfig *pathconfig,
index f61726f1f7f83af90a53ef1488b7dad385444698..eec2ee271eb67db29a3cabc1b6a44080d01ce480 100644 (file)
@@ -7,7 +7,6 @@ extern "C" {
 
 PyAPI_DATA(PyTypeObject) PySeqIter_Type;
 PyAPI_DATA(PyTypeObject) PyCallIter_Type;
-PyAPI_DATA(PyTypeObject) PyCmpWrapper_Type;
 
 #define PySeqIter_Check(op) (Py_TYPE(op) == &PySeqIter_Type)
 
index 6057279d51c3a482510e0a69ad7f99103344fe8c..baf94152792ed424da4e72b1a55ef0f55b8ced7f 100644 (file)
@@ -43,7 +43,6 @@ typedef struct {
 PyAPI_DATA(PyTypeObject) PyList_Type;
 PyAPI_DATA(PyTypeObject) PyListIter_Type;
 PyAPI_DATA(PyTypeObject) PyListRevIter_Type;
-PyAPI_DATA(PyTypeObject) PySortWrapper_Type;
 
 #define PyList_Check(op) \
     PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS)
index a15d05f89917e961c35c6c5c74f040d38e40e0f7..d9f8d4f80c2cd815ed42aff2954164ae288dd6e1 100644 (file)
@@ -22,8 +22,6 @@ typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *,
 typedef PyObject *(*_PyCFunctionFastWithKeywords) (PyObject *,
                                                    PyObject *const *, Py_ssize_t,
                                                    PyObject *);
-typedef PyObject *(*PyNoArgsFunction)(PyObject *);
-
 PyAPI_FUNC(PyCFunction) PyCFunction_GetFunction(PyObject *);
 PyAPI_FUNC(PyObject *) PyCFunction_GetSelf(PyObject *);
 PyAPI_FUNC(int) PyCFunction_GetFlags(PyObject *);
index 569d69648994fbeafc23067d777451beda84a91f..1cf83b7a36d14882ac665c7f9ed71aab5a19ac5d 100644 (file)
@@ -3,7 +3,6 @@
 #define Py_PYTHREAD_H
 
 typedef void *PyThread_type_lock;
-typedef void *PyThread_type_sema;
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/Misc/NEWS.d/next/C API/2020-01-17-19-25-48.bpo-39372.hGJMY6.rst b/Misc/NEWS.d/next/C API/2020-01-17-19-25-48.bpo-39372.hGJMY6.rst
new file mode 100644 (file)
index 0000000..8415d75
--- /dev/null
@@ -0,0 +1,8 @@
+Clean header files of interfaces defined but with no implementation. 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``.
index d0fc18d22fa5f36b59176fcf1f47569b9a44e2fa..e95552624aa50e33df7066fea29e6b543a0722f9 100644 (file)
@@ -24,6 +24,3 @@
 
 #define STRINGLIB_TOSTR          PyObject_Str
 #define STRINGLIB_TOASCII        PyObject_ASCII
-
-#define _Py_InsertThousandsGrouping _PyUnicode_ascii_InsertThousandsGrouping
-
index ce1eb57f0d7da90bba0cf14217f69693bcec4517..bc4b104f112ccb31f9073ca189fabb388d9cbd4d 100644 (file)
@@ -24,7 +24,3 @@
 
 #define STRINGLIB_TOSTR          PyObject_Str
 #define STRINGLIB_TOASCII        PyObject_ASCII
-
-#define _Py_InsertThousandsGrouping _PyUnicode_ucs1_InsertThousandsGrouping
-
-
index f900cb65f8cede16d703d52530239db0b88cc14c..86a1dff1b5637855b1eb045486c4a1d5dcc786d8 100644 (file)
@@ -24,6 +24,3 @@
 
 #define STRINGLIB_TOSTR          PyObject_Str
 #define STRINGLIB_TOASCII        PyObject_ASCII
-
-#define _Py_InsertThousandsGrouping _PyUnicode_ucs2_InsertThousandsGrouping
-
index 86a480f1e3a7eda9a5251cbe26ccc1b28ae7e124..3c32a93c96a1c74fa58e727229df62dfd974c089 100644 (file)
@@ -25,5 +25,3 @@
 #define STRINGLIB_TOSTR          PyObject_Str
 #define STRINGLIB_TOASCII        PyObject_ASCII
 
-#define _Py_InsertThousandsGrouping _PyUnicode_ucs4_InsertThousandsGrouping
-
index f9d3f1d3328d57b93af67e194933f25edf1833ad..c41e254fde6f4d4cee8bb99e2900e821830b0250 100644 (file)
@@ -6,6 +6,5 @@
 #undef  STRINGLIB_STR
 #undef  STRINGLIB_LEN
 #undef  STRINGLIB_NEW
-#undef  _Py_InsertThousandsGrouping
 #undef STRINGLIB_IS_UNICODE