bpo-43770: _PyTypes_Init() inits _PyAnextAwaitable_Type (GH-25266) · python/cpython@b98eba5 · GitHub
Skip to content

Commit b98eba5

Browse files
authored
bpo-43770: _PyTypes_Init() inits _PyAnextAwaitable_Type (GH-25266)
* Rename PyAnextAwaitable_Type to _PyAnextAwaitable_Type. * Expose the type in the internal C API.
1 parent 453074c commit b98eba5

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

Include/iterobject.h

Lines changed: 3 additions & 0 deletions

Objects/iterobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ static PyAsyncMethods anextawaitable_as_async = {
333333
0, /* am_send */
334334
};
335335

336-
PyTypeObject PyAnextAwaitable_Type = {
336+
PyTypeObject _PyAnextAwaitable_Type = {
337337
PyVarObject_HEAD_INIT(&PyType_Type, 0)
338338
"anext_awaitable", /* tp_name */
339339
sizeof(anextawaitableobject), /* tp_basicsize */
@@ -369,7 +369,7 @@ PyObject *
369369
PyAnextAwaitable_New(PyObject *awaitable, PyObject *default_value)
370370
{
371371
anextawaitableobject *anext = PyObject_GC_New(
372-
anextawaitableobject, &PyAnextAwaitable_Type);
372+
anextawaitableobject, &_PyAnextAwaitable_Type);
373373
if (anext == NULL) {
374374
return NULL;
375375
}

Objects/object.c

Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)