aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Objects/typeobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/typeobject.c')
-rw-r--r--Objects/typeobject.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 55bf9b3f389..b4188b8bcaf 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -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;