mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
bpo-42085: Introduce dedicated entry in PyAsyncMethods for sending values (#22780)
This commit is contained in:
parent
e59b2deffd
commit
1e996c3a3b
13 changed files with 146 additions and 49 deletions
|
|
@ -5427,6 +5427,13 @@ PyType_Ready(PyTypeObject *type)
|
|||
_PyObject_ASSERT((PyObject *)type, type->tp_vectorcall_offset > 0);
|
||||
_PyObject_ASSERT((PyObject *)type, type->tp_call != NULL);
|
||||
}
|
||||
/* Consistency check for Py_TPFLAGS_HAVE_AM_SEND - flag requires
|
||||
* type->tp_as_async->am_send to be present.
|
||||
*/
|
||||
if (type->tp_flags & Py_TPFLAGS_HAVE_AM_SEND) {
|
||||
_PyObject_ASSERT((PyObject *)type, type->tp_as_async != NULL);
|
||||
_PyObject_ASSERT((PyObject *)type, type->tp_as_async->am_send != NULL);
|
||||
}
|
||||
|
||||
type->tp_flags |= Py_TPFLAGS_READYING;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue