diff Include/intobject.h @ 19550:19d271f297dc legacy-trunk

Make the PyXXX_Check() macros for the numeric types inheritance-aware.
author Guido van Rossum <guido@python.org>
date Wed, 29 Aug 2001 15:45:32 +0000
parents 7257e87e0720
children 5158e4789459
line wrap: on
line diff
--- a/Include/intobject.h	Wed Aug 29 15:24:53 2001 +0000
+++ b/Include/intobject.h	Wed Aug 29 15:45:32 2001 +0000
@@ -27,7 +27,7 @@
 
 extern DL_IMPORT(PyTypeObject) PyInt_Type;
 
-#define PyInt_Check(op) ((op)->ob_type == &PyInt_Type)
+#define PyInt_Check(op) PyObject_TypeCheck(op, &PyInt_Type)
 
 extern DL_IMPORT(PyObject *) PyInt_FromString(char*, char**, int);
 #ifdef Py_USING_UNICODE