diff options
Diffstat (limited to 'Modules/_abc.c')
-rw-r--r-- | Modules/_abc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/_abc.c b/Modules/_abc.c index 8628839..7daa18e 100644 --- a/Modules/_abc.c +++ b/Modules/_abc.c @@ -569,6 +569,11 @@ _abc__abc_subclasscheck_impl(PyObject *module, PyObject *self, PyObject *subclass) /*[clinic end generated code: output=b56c9e4a530e3894 input=1d947243409d10b8]*/ { + if (!PyType_Check(subclass)) { + PyErr_SetString(PyExc_TypeError, "issubclass() arg 1 must be a class"); + return NULL; + } + PyObject *ok, *mro = NULL, *subclasses = NULL, *result = NULL; Py_ssize_t pos; int incache; |