summaryrefslogtreecommitdiffstats
path: root/Include/complexobject.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-08-29 15:45:32 (GMT)
committerGuido van Rossum <guido@python.org>2001-08-29 15:45:32 (GMT)
commitc16fcdf533583039d687f8ca2e88a1c21f3feeb3 (patch)
tree987f9612707f568bcc20164da3993670073cfc6f /Include/complexobject.h
parentc51395d79744a1aeb456d34b9bf5b5ea110ee677 (diff)
downloadcpython-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/complexobject.h')
-rw-r--r--Include/complexobject.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/complexobject.h b/Include/complexobject.h
index ef5016f..edd2069 100644
--- a/Include/complexobject.h
+++ b/Include/complexobject.h
@@ -42,7 +42,7 @@ typedef struct {
extern DL_IMPORT(PyTypeObject) PyComplex_Type;
-#define PyComplex_Check(op) ((op)->ob_type == &PyComplex_Type)
+#define PyComplex_Check(op) PyObject_TypeCheck(op, &PyComplex_Type)
extern DL_IMPORT(PyObject *) PyComplex_FromCComplex(Py_complex);
extern DL_IMPORT(PyObject *) PyComplex_FromDoubles(double real, double imag);