Skip to content

Commit 5a6bb1e

Browse files
committed
gh-106320: Remove _PyAnextAwaitable_Type from the public C API
It's not needed to declare it in Include/iterobject.h: just use "extern" where it's used (only in object.c).
1 parent 4fb96a1 commit 5a6bb1e

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Include/iterobject.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ extern "C" {
77

88
PyAPI_DATA(PyTypeObject) PySeqIter_Type;
99
PyAPI_DATA(PyTypeObject) PyCallIter_Type;
10-
#ifdef Py_BUILD_CORE
11-
extern PyTypeObject _PyAnextAwaitable_Type;
12-
#endif
1310

1411
#define PySeqIter_Check(op) Py_IS_TYPE((op), &PySeqIter_Type)
1512

Objects/object.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2049,11 +2049,12 @@ _PyObject_InitState(PyInterpreterState *interp)
20492049
}
20502050

20512051

2052-
extern PyTypeObject _Py_GenericAliasIterType;
2053-
extern PyTypeObject _PyMemoryIter_Type;
2052+
extern PyTypeObject _PyAnextAwaitable_Type;
2053+
extern PyTypeObject _PyLegacyEventHandler_Type;
20542054
extern PyTypeObject _PyLineIterator;
2055+
extern PyTypeObject _PyMemoryIter_Type;
20552056
extern PyTypeObject _PyPositionsIterator;
2056-
extern PyTypeObject _PyLegacyEventHandler_Type;
2057+
extern PyTypeObject _Py_GenericAliasIterType;
20572058

20582059
static PyTypeObject* static_types[] = {
20592060
// The two most important base types: must be initialized first and

0 commit comments

Comments
 (0)