bpo-42085: Introduce dedicated entry in PyAsyncMethods for sending values (#22780)

This commit is contained in:
Vladimir Matveev 2020-11-10 12:09:55 -08:00 committed by GitHub
parent e59b2deffd
commit 1e996c3a3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 146 additions and 49 deletions

View file

@ -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;