Move the code implementing isinstance() and issubclass() to new C

APIs, PyObject_IsInstance() and PyObject_IsSubclass() -- both
returning an int, or -1 for errors.
This commit is contained in:
Guido van Rossum 2001-03-21 18:40:58 +00:00
parent 91751143eb
commit 823649d544
3 changed files with 125 additions and 96 deletions

View file

@ -1074,6 +1074,13 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
*/
DL_IMPORT(int) PyObject_IsInstance(PyObject *object, PyObject *typeorclass);
/* isinstance(object, typeorclass) */
DL_IMPORT(int) PyObject_IsSubclass(PyObject *object, PyObject *typeorclass);
/* issubclass(object, typeorclass) */
#ifdef __cplusplus
}
#endif