mirror of
https://github.com/python/cpython.git
synced 2024-11-23 01:45:25 +08:00
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:
parent
39506ee565
commit
301eb7e607
@ -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)
|
||||
|
||||
|
@ -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',)
|
||||
|
@ -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 -
|
||||
|
Can't render this file because it has a wrong number of fields in line 4.
|
Loading…
Reference in New Issue
Block a user