Skip to content

Commit b450c35

Browse files
vstinnerasvetlov
authored andcommitted
bpo-45316: Move _PyArg_Fini() to internal C API (GH-31580)
Move the private unexported _PyArg_Fini() function to the internal C API: to the pycore_pylifecycle.h header file.
1 parent 8b3f912 commit b450c35

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

Include/internal/pycore_pylifecycle.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ extern void _PyAST_Fini(PyInterpreterState *interp);
8484
extern void _PyAtExit_Fini(PyInterpreterState *interp);
8585
extern void _PyThread_FiniType(PyInterpreterState *interp);
8686
extern void _Py_Deepfreeze_Fini(void);
87+
extern void _PyArg_Fini(void);
8788

8889
extern PyStatus _PyGILState_Init(_PyRuntimeState *runtime);
8990
extern PyStatus _PyGILState_SetTstate(PyThreadState *tstate);

Include/modsupport.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ PyAPI_FUNC(PyObject * const *) _PyArg_UnpackKeywordsWithVararg(
141141
(minpos) <= (nargs) && (nargs) <= (maxpos) && args != NULL) ? (args) : \
142142
_PyArg_UnpackKeywords((args), (nargs), (kwargs), (kwnames), (parser), \
143143
(minpos), (maxpos), (minkw), (buf)))
144-
145-
void _PyArg_Fini(void);
146144
#endif /* Py_LIMITED_API */
147145

148146
// Add an attribute with name 'name' and value 'obj' to the module 'mod.

Python/getargs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include "Python.h"
55
#include "pycore_tuple.h" // _PyTuple_ITEMS()
6+
#include "pycore_pylifecycle.h" // _PyArg_Fini
67

78
#include <ctype.h>
89
#include <float.h>

Python/pylifecycle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ pycore_interp_init(PyThreadState *tstate)
829829
// Intern strings in deep-frozen modules first so that others
830830
// can use it instead of creating a heap allocated string.
831831
_Py_Deepfreeze_Init();
832-
832+
833833
status = pycore_init_types(interp);
834834
if (_PyStatus_EXCEPTION(status)) {
835835
goto done;

0 commit comments

Comments
 (0)