summaryrefslogtreecommitdiff
path: root/Include/intobject.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-08-29 15:45:32 +0000
committerGuido van Rossum <guido@python.org>2001-08-29 15:45:32 +0000
commit841504facbce67a6f89bc5ec600c61943e1263e1 (patch)
tree6344dbed87b3a884cdc6df2b0fdacdad95b15473 /Include/intobject.h
parente28fbead5a5ac73fa38e8037ff02ca89b650079e (diff)
downloadcpython-841504facbce67a6f89bc5ec600c61943e1263e1.tar.gz
Make the PyXXX_Check() macros for the numeric types inheritance-aware.
Diffstat (limited to 'Include/intobject.h')
-rw-r--r--Include/intobject.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/intobject.h b/Include/intobject.h
index 128d0d31cd..29448e3cc1 100644
--- a/Include/intobject.h
+++ b/Include/intobject.h
@@ -27,7 +27,7 @@ typedef struct {
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