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.
diff --git a/Include/internal/pycore_pylifecycle.h b/Include/internal/pycore_pylifecycle.h
index bdc4bf5..4957429 100644
--- a/Include/internal/pycore_pylifecycle.h
+++ b/Include/internal/pycore_pylifecycle.h
@@ -62,18 +62,19 @@
 
 /* Various internal finalizers */
 
-extern void PyMethod_Fini(void);
-extern void PyFrame_Fini(void);
-extern void PyCFunction_Fini(void);
-extern void PyDict_Fini(void);
-extern void PyTuple_Fini(void);
-extern void PyList_Fini(void);
-extern void PySet_Fini(void);
-extern void PyBytes_Fini(void);
-extern void PyFloat_Fini(void);
+extern void _PyMethod_Fini(void);
+extern void _PyFrame_Fini(void);
+extern void _PyCFunction_Fini(void);
+extern void _PyDict_Fini(void);
+extern void _PyTuple_Fini(void);
+extern void _PyList_Fini(void);
+extern void _PySet_Fini(void);
+extern void _PyBytes_Fini(void);
+extern void _PyFloat_Fini(void);
+extern void _PySlice_Fini(void);
+extern void _PyAsyncGen_Fini(void);
+
 extern void PyOS_FiniInterrupts(void);
-extern void PySlice_Fini(void);
-extern void PyAsyncGen_Fini(void);
 
 extern void _PyExc_Fini(void);
 extern void _PyImport_Fini(void);
@@ -82,7 +83,7 @@
 extern void _PyType_Fini(void);
 extern void _Py_HashRandomization_Fini(void);
 extern void _PyUnicode_Fini(void);
-extern void PyLong_Fini(void);
+extern void _PyLong_Fini(void);
 extern void _PyFaulthandler_Fini(void);
 extern void _PyHash_Fini(void);
 extern int _PyTraceMalloc_Fini(void);
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index c4edcca..6d55330 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -3047,7 +3047,7 @@
 }
 
 void
-PyBytes_Fini(void)
+_PyBytes_Fini(void)
 {
     int i;
     for (i = 0; i < UCHAR_MAX + 1; i++)
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 40cbeaa..4a9add1 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -375,7 +375,7 @@
 }
 
 void
-PyMethod_Fini(void)
+_PyMethod_Fini(void)
 {
     (void)PyMethod_ClearFreeList();
 }
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index fec3a87..73956df 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -282,7 +282,7 @@
 
 
 void
-PyDict_Fini(void)
+_PyDict_Fini(void)
 {
     PyDict_ClearFreeList();
 }
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 689e929..6643ff3 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -2031,7 +2031,7 @@
 }
 
 void
-PyFloat_Fini(void)
+_PyFloat_Fini(void)
 {
     (void)PyFloat_ClearFreeList();
 }
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index a796a59..27ef9ff 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -997,7 +997,7 @@
 }
 
 void
-PyFrame_Fini(void)
+_PyFrame_Fini(void)
 {
     (void)PyFrame_ClearFreeList();
 }
diff --git a/Objects/genobject.c b/Objects/genobject.c
index 5d1f9c7..5e0bfa4 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -1463,7 +1463,7 @@
 }
 
 void
-PyAsyncGen_Fini(void)
+_PyAsyncGen_Fini(void)
 {
     PyAsyncGen_ClearFreeLists();
 }
diff --git a/Objects/listobject.c b/Objects/listobject.c
index cea9b24..5fca08e 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -138,7 +138,7 @@
 }
 
 void
-PyList_Fini(void)
+_PyList_Fini(void)
 {
     PyList_ClearFreeList();
 }
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 74037be..475b9bd 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -5869,7 +5869,7 @@
 }
 
 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
diff --git a/Objects/methodobject.c b/Objects/methodobject.c
index b997746..7d70cc0 100644
--- a/Objects/methodobject.c
+++ b/Objects/methodobject.c
@@ -319,7 +319,7 @@
 }
 
 void
-PyCFunction_Fini(void)
+_PyCFunction_Fini(void)
 {
     (void)PyCFunction_ClearFreeList();
 }
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 8cd95ba..56858db 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -2318,7 +2318,7 @@
 }
 
 void
-PySet_Fini(void)
+_PySet_Fini(void)
 {
     Py_CLEAR(emptyfrozenset);
 }
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index 7c10eb6..e884a58 100644
--- a/Objects/sliceobject.c
+++ b/Objects/sliceobject.c
@@ -100,7 +100,8 @@
  * 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) {
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 79a5d55..3419baa 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -989,7 +989,7 @@
 }
 
 void
-PyTuple_Fini(void)
+_PyTuple_Fini(void)
 {
 #if PyTuple_MAXSAVESIZE > 0
     /* empty tuples are used all over the place and applications may
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index e3333db..7cda44d 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1307,22 +1307,22 @@
     _PyExc_Fini();
 
     /* Sundry finalizers */
-    PyMethod_Fini();
-    PyFrame_Fini();
-    PyCFunction_Fini();
-    PyTuple_Fini();
-    PyList_Fini();
-    PySet_Fini();
-    PyBytes_Fini();
-    PyLong_Fini();
-    PyFloat_Fini();
-    PyDict_Fini();
-    PySlice_Fini();
+    _PyMethod_Fini();
+    _PyFrame_Fini();
+    _PyCFunction_Fini();
+    _PyTuple_Fini();
+    _PyList_Fini();
+    _PySet_Fini();
+    _PyBytes_Fini();
+    _PyLong_Fini();
+    _PyFloat_Fini();
+    _PyDict_Fini();
+    _PySlice_Fini();
     _PyGC_Fini(runtime);
     _PyWarnings_Fini(interp);
     _Py_HashRandomization_Fini();
     _PyArg_Fini();
-    PyAsyncGen_Fini();
+    _PyAsyncGen_Fini();
     _PyContext_Fini();
 
     /* Cleanup Unicode implementation */