Add a flag to indicate the presence of the tp_richcompare field, and

add it to the default flags.
This commit is contained in:
Guido van Rossum 2001-01-24 22:13:48 +00:00
parent 42756df91c
commit bacca54b59
1 changed files with 7 additions and 2 deletions

View File

@ -337,9 +337,14 @@ given type object has a specified feature.
/* PyNumberMethods do their own coercion */ /* PyNumberMethods do their own coercion */
#define Py_TPFLAGS_CHECKTYPES (1L<<4) #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_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) #define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0)