Make the PyXXX_Check() macros for the numeric types inheritance-aware.
diff --git a/Include/longobject.h b/Include/longobject.h
index 8efa35f..5d1ea0a 100644
--- a/Include/longobject.h
+++ b/Include/longobject.h
@@ -11,7 +11,7 @@
 
 extern DL_IMPORT(PyTypeObject) PyLong_Type;
 
-#define PyLong_Check(op) ((op)->ob_type == &PyLong_Type)
+#define PyLong_Check(op) PyObject_TypeCheck(op, &PyLong_Type)
 
 extern DL_IMPORT(PyObject *) PyLong_FromLong(long);
 extern DL_IMPORT(PyObject *) PyLong_FromUnsignedLong(unsigned long);