From 841504facbce67a6f89bc5ec600c61943e1263e1 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 29 Aug 2001 15:45:32 +0000 Subject: Make the PyXXX_Check() macros for the numeric types inheritance-aware. --- Include/floatobject.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Include/floatobject.h') diff --git a/Include/floatobject.h b/Include/floatobject.h index 6e36a2f318..9f67bc107d 100644 --- a/Include/floatobject.h +++ b/Include/floatobject.h @@ -18,7 +18,7 @@ typedef struct { extern DL_IMPORT(PyTypeObject) PyFloat_Type; -#define PyFloat_Check(op) ((op)->ob_type == &PyFloat_Type) +#define PyFloat_Check(op) PyObject_TypeCheck(op, &PyFloat_Type) /* Return Python float from string PyObject. Second argument ignored on input, and, if non-NULL, NULL is stored into *junk (this tried to serve a -- cgit v1.2.1