diff options
author | Guido van Rossum <guido@python.org> | 2001-08-29 15:45:32 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-08-29 15:45:32 (GMT) |
commit | c16fcdf533583039d687f8ca2e88a1c21f3feeb3 (patch) | |
tree | 987f9612707f568bcc20164da3993670073cfc6f /Include/longobject.h | |
parent | c51395d79744a1aeb456d34b9bf5b5ea110ee677 (diff) | |
download | cpython-c16fcdf533583039d687f8ca2e88a1c21f3feeb3.zip cpython-c16fcdf533583039d687f8ca2e88a1c21f3feeb3.tar.gz cpython-c16fcdf533583039d687f8ca2e88a1c21f3feeb3.tar.bz2 |
Make the PyXXX_Check() macros for the numeric types inheritance-aware.
Diffstat (limited to 'Include/longobject.h')
-rw-r--r-- | Include/longobject.h | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ typedef struct _longobject PyLongObject; /* Revealed in longintrepr.h */ 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); |