From: Guido van Rossum Date: Wed, 24 Jan 2001 22:13:48 +0000 (+0000) Subject: Add a flag to indicate the presence of the tp_richcompare field, and X-Git-Tag: v2.1a2~201 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bacca54b5955ae33354b362564806a1857fe505e;p=python Add a flag to indicate the presence of the tp_richcompare field, and add it to the default flags. --- diff --git a/Include/object.h b/Include/object.h index 050369191a..de6750550a 100644 --- a/Include/object.h +++ b/Include/object.h @@ -337,9 +337,14 @@ given type object has a specified feature. /* PyNumberMethods do their own coercion */ #define Py_TPFLAGS_CHECKTYPES (1L<<4) -#define Py_TPFLAGS_DEFAULT (Py_TPFLAGS_HAVE_GETCHARBUFFER | \ +#define Py_TPFLAGS_HAVE_RICHCOMPARE (1L<<5) + +#define Py_TPFLAGS_DEFAULT ( \ + Py_TPFLAGS_HAVE_GETCHARBUFFER | \ Py_TPFLAGS_HAVE_SEQUENCE_IN | \ - Py_TPFLAGS_HAVE_INPLACEOPS) + Py_TPFLAGS_HAVE_INPLACEOPS | \ + Py_TPFLAGS_HAVE_RICHCOMPARE | \ + 0) #define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0)