mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-43770: _PyTypes_Init() inits _PyAnextAwaitable_Type (GH-25266)
* Rename PyAnextAwaitable_Type to _PyAnextAwaitable_Type. * Expose the type in the internal C API.
This commit is contained in:
parent
453074c8da
commit
b98eba5bc2
3 changed files with 6 additions and 2 deletions
|
@ -333,7 +333,7 @@ static PyAsyncMethods anextawaitable_as_async = {
|
|||
0, /* am_send */
|
||||
};
|
||||
|
||||
PyTypeObject PyAnextAwaitable_Type = {
|
||||
PyTypeObject _PyAnextAwaitable_Type = {
|
||||
PyVarObject_HEAD_INIT(&PyType_Type, 0)
|
||||
"anext_awaitable", /* tp_name */
|
||||
sizeof(anextawaitableobject), /* tp_basicsize */
|
||||
|
@ -369,7 +369,7 @@ PyObject *
|
|||
PyAnextAwaitable_New(PyObject *awaitable, PyObject *default_value)
|
||||
{
|
||||
anextawaitableobject *anext = PyObject_GC_New(
|
||||
anextawaitableobject, &PyAnextAwaitable_Type);
|
||||
anextawaitableobject, &_PyAnextAwaitable_Type);
|
||||
if (anext == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue