gh-106320: Remove _PyAnextAwaitable_Type from the public C API (#108597)

It's not needed to declare it in Include/iterobject.h: just use
"extern" where it's used (only in object.c).
This commit is contained in:
Victor Stinner
2023-08-29 04:05:11 +02:00
committed by GitHub
parent 39506ee565
commit 301eb7e607
4 changed files with 7 additions and 10 deletions
-3
View File
@@ -7,9 +7,6 @@ extern "C" {
PyAPI_DATA(PyTypeObject) PySeqIter_Type;
PyAPI_DATA(PyTypeObject) PyCallIter_Type;
#ifdef Py_BUILD_CORE
extern PyTypeObject _PyAnextAwaitable_Type;
#endif
#define PySeqIter_Check(op) Py_IS_TYPE((op), &PySeqIter_Type)
+5 -4
View File
@@ -2049,11 +2049,12 @@ _PyObject_InitState(PyInterpreterState *interp)
}
extern PyTypeObject _Py_GenericAliasIterType;
extern PyTypeObject _PyMemoryIter_Type;
extern PyTypeObject _PyLineIterator;
extern PyTypeObject _PyPositionsIterator;
extern PyTypeObject _PyAnextAwaitable_Type;
extern PyTypeObject _PyLegacyEventHandler_Type;
extern PyTypeObject _PyLineIterator;
extern PyTypeObject _PyMemoryIter_Type;
extern PyTypeObject _PyPositionsIterator;
extern PyTypeObject _Py_GenericAliasIterType;
static PyTypeObject* static_types[] = {
// The two most important base types: must be initialized first and
@@ -69,7 +69,6 @@ def preprocess(filename,
cwd = os.path.abspath(cwd or '.')
filename = _normpath(filename, cwd)
print(filename)
postargs = POST_ARGS
if os.path.basename(filename) not in USE_LIMITED_C_API:
postargs += ('-DPy_BUILD_CORE=1',)
+2 -2
View File
@@ -57,6 +57,7 @@ Objects/genobject.c - _PyCoroWrapper_Type -
Objects/interpreteridobject.c - PyInterpreterID_Type -
Objects/iterobject.c - PyCallIter_Type -
Objects/iterobject.c - PySeqIter_Type -
Objects/iterobject.c - _PyAnextAwaitable_Type -
Objects/listobject.c - PyListIter_Type -
Objects/listobject.c - PyListRevIter_Type -
Objects/listobject.c - PyList_Type -
@@ -70,6 +71,7 @@ Objects/moduleobject.c - PyModule_Type -
Objects/namespaceobject.c - _PyNamespace_Type -
Objects/object.c - _PyNone_Type -
Objects/object.c - _PyNotImplemented_Type -
Objects/object.c - _PyAnextAwaitable_Type -
Objects/odictobject.c - PyODictItems_Type -
Objects/odictobject.c - PyODictIter_Type -
Objects/odictobject.c - PyODictKeys_Type -
@@ -113,8 +115,6 @@ Objects/codeobject.c - _PyLineIterator -
Objects/codeobject.c - _PyPositionsIterator -
Objects/genericaliasobject.c - _Py_GenericAliasIterType -
# Not in a .h file:
Objects/iterobject.c - _PyAnextAwaitable_Type -
# Not in a .h file:
Objects/memoryobject.c - _PyMemoryIter_Type -
Objects/unicodeobject.c - _PyUnicodeASCIIIter_Type -
Objects/unionobject.c - _PyUnion_Type -
1 filename funcname name reason
57 Objects/listobject.c - PyListRevIter_Type PyListIter_Type -
58 Objects/listobject.c - PyList_Type PyListRevIter_Type -
59 Objects/longobject.c Objects/listobject.c - PyLong_Type PyList_Type -
60 Objects/longobject.c - PyLong_Type -
61 Objects/memoryobject.c - PyMemoryView_Type -
62 Objects/memoryobject.c - _PyManagedBuffer_Type -
63 Objects/methodobject.c - PyCFunction_Type -
71 Objects/odictobject.c - PyODictIter_Type PyODictItems_Type -
72 Objects/odictobject.c - PyODictKeys_Type PyODictIter_Type -
73 Objects/odictobject.c - PyODictValues_Type PyODictKeys_Type -
74 Objects/odictobject.c - PyODictValues_Type -
75 Objects/odictobject.c - PyODict_Type -
76 Objects/picklebufobject.c - PyPickleBuffer_Type -
77 Objects/rangeobject.c - PyLongRangeIter_Type -
115 Objects/unicodeobject.c Python/context.c - _PyUnicodeASCIIIter_Type _PyContextTokenMissing_Type -
116 Objects/unionobject.c Python/hamt.c - _PyUnion_Type _PyHamtItems_Type -
117 Python/context.c Python/hamt.c - _PyContextTokenMissing_Type _PyHamtKeys_Type -
Python/hamt.c - _PyHamtItems_Type -
Python/hamt.c - _PyHamtKeys_Type -
118 Python/hamt.c - _PyHamtValues_Type -
119 Python/hamt.c - _PyHamt_ArrayNode_Type -
120 Python/hamt.c - _PyHamt_BitmapNode_Type -