summaryrefslogtreecommitdiffstats
path: root/Include/longobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/longobject.h')
-rw-r--r--Include/longobject.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Include/longobject.h b/Include/longobject.h
index 7f2cda6..b7a29b5 100644
--- a/Include/longobject.h
+++ b/Include/longobject.h
@@ -11,7 +11,8 @@ typedef struct _longobject PyLongObject; /* Revealed in longintrepr.h */
PyAPI_DATA(PyTypeObject) PyLong_Type;
-#define PyLong_Check(op) PyObject_TypeCheck(op, &PyLong_Type)
+#define PyLong_Check(op) \
+ PyType_FastSubclass((op)->ob_type, Py_TPFLAGS_LONG_SUBCLASS)
#define PyLong_CheckExact(op) ((op)->ob_type == &PyLong_Type)
PyAPI_FUNC(PyObject *) PyLong_FromLong(long);