mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Make PyXXX_Fini() functions private (GH-15531)
For example, rename PyTuple_Fini() to _PyTuple_Fini(). These functions are only declared in the internal C API.
This commit is contained in:
parent
d3cc189b17
commit
bed4817d52
14 changed files with 38 additions and 36 deletions
|
@ -3047,7 +3047,7 @@ error:
|
|||
}
|
||||
|
||||
void
|
||||
PyBytes_Fini(void)
|
||||
_PyBytes_Fini(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < UCHAR_MAX + 1; i++)
|
||||
|
|
|
@ -375,7 +375,7 @@ PyMethod_ClearFreeList(void)
|
|||
}
|
||||
|
||||
void
|
||||
PyMethod_Fini(void)
|
||||
_PyMethod_Fini(void)
|
||||
{
|
||||
(void)PyMethod_ClearFreeList();
|
||||
}
|
||||
|
|
|
@ -282,7 +282,7 @@ _PyDict_DebugMallocStats(FILE *out)
|
|||
|
||||
|
||||
void
|
||||
PyDict_Fini(void)
|
||||
_PyDict_Fini(void)
|
||||
{
|
||||
PyDict_ClearFreeList();
|
||||
}
|
||||
|
|
|
@ -2031,7 +2031,7 @@ PyFloat_ClearFreeList(void)
|
|||
}
|
||||
|
||||
void
|
||||
PyFloat_Fini(void)
|
||||
_PyFloat_Fini(void)
|
||||
{
|
||||
(void)PyFloat_ClearFreeList();
|
||||
}
|
||||
|
|
|
@ -997,7 +997,7 @@ PyFrame_ClearFreeList(void)
|
|||
}
|
||||
|
||||
void
|
||||
PyFrame_Fini(void)
|
||||
_PyFrame_Fini(void)
|
||||
{
|
||||
(void)PyFrame_ClearFreeList();
|
||||
}
|
||||
|
|
|
@ -1463,7 +1463,7 @@ PyAsyncGen_ClearFreeLists(void)
|
|||
}
|
||||
|
||||
void
|
||||
PyAsyncGen_Fini(void)
|
||||
_PyAsyncGen_Fini(void)
|
||||
{
|
||||
PyAsyncGen_ClearFreeLists();
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@ PyList_ClearFreeList(void)
|
|||
}
|
||||
|
||||
void
|
||||
PyList_Fini(void)
|
||||
_PyList_Fini(void)
|
||||
{
|
||||
PyList_ClearFreeList();
|
||||
}
|
||||
|
|
|
@ -5869,7 +5869,7 @@ _PyLong_Init(void)
|
|||
}
|
||||
|
||||
void
|
||||
PyLong_Fini(void)
|
||||
_PyLong_Fini(void)
|
||||
{
|
||||
/* Integers are currently statically allocated. Py_DECREF is not
|
||||
needed, but Python must forget about the reference or multiple
|
||||
|
|
|
@ -319,7 +319,7 @@ PyCFunction_ClearFreeList(void)
|
|||
}
|
||||
|
||||
void
|
||||
PyCFunction_Fini(void)
|
||||
_PyCFunction_Fini(void)
|
||||
{
|
||||
(void)PyCFunction_ClearFreeList();
|
||||
}
|
||||
|
|
|
@ -2318,7 +2318,7 @@ PySet_ClearFreeList(void)
|
|||
}
|
||||
|
||||
void
|
||||
PySet_Fini(void)
|
||||
_PySet_Fini(void)
|
||||
{
|
||||
Py_CLEAR(emptyfrozenset);
|
||||
}
|
||||
|
|
|
@ -100,7 +100,8 @@ PyObject _Py_EllipsisObject = {
|
|||
* created and then deleted again
|
||||
*/
|
||||
static PySliceObject *slice_cache = NULL;
|
||||
void PySlice_Fini(void)
|
||||
|
||||
void _PySlice_Fini(void)
|
||||
{
|
||||
PySliceObject *obj = slice_cache;
|
||||
if (obj != NULL) {
|
||||
|
|
|
@ -989,7 +989,7 @@ PyTuple_ClearFreeList(void)
|
|||
}
|
||||
|
||||
void
|
||||
PyTuple_Fini(void)
|
||||
_PyTuple_Fini(void)
|
||||
{
|
||||
#if PyTuple_MAXSAVESIZE > 0
|
||||
/* empty tuples are used all over the place and applications may
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue