summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/floatobject.h2
-rw-r--r--Include/object.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/Include/floatobject.h b/Include/floatobject.h
index 3b6ca47..51be745 100644
--- a/Include/floatobject.h
+++ b/Include/floatobject.h
@@ -14,6 +14,8 @@ extern "C" {
PyAPI_DATA(PyTypeObject) PyFloat_Type;
#define PyFloat_Check(op) PyObject_TypeCheck(op, &PyFloat_Type)
+#define PyFloat_Check(op) \
+ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_FLOAT_SUBCLASS)
#define PyFloat_CheckExact(op) Py_IS_TYPE(op, &PyFloat_Type)
#ifdef Py_NAN
diff --git a/Include/object.h b/Include/object.h
index e5544e8..ee817a5 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -397,6 +397,7 @@ given type object has a specified feature.
#define _Py_TPFLAGS_MATCH_SELF (1UL << 22)
/* These flags are used to determine if a type is a subclass. */
+#define Py_TPFLAGS_FLOAT_SUBCLASS (1UL << 23)
#define Py_TPFLAGS_LONG_SUBCLASS (1UL << 24)
#define Py_TPFLAGS_LIST_SUBCLASS (1UL << 25)
#define Py_TPFLAGS_TUPLE_SUBCLASS (1UL << 26)