Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bacca54

Browse files
committed
Add a flag to indicate the presence of the tp_richcompare field, and
add it to the default flags.
1 parent 42756df commit bacca54

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Include/object.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,14 @@ given type object has a specified feature.
337337
/* PyNumberMethods do their own coercion */
338338
#define Py_TPFLAGS_CHECKTYPES (1L<<4)
339339

340-
#define Py_TPFLAGS_DEFAULT (Py_TPFLAGS_HAVE_GETCHARBUFFER | \
340+
#define Py_TPFLAGS_HAVE_RICHCOMPARE (1L<<5)
341+
342+
#define Py_TPFLAGS_DEFAULT ( \
343+
Py_TPFLAGS_HAVE_GETCHARBUFFER | \
341344
Py_TPFLAGS_HAVE_SEQUENCE_IN | \
342-
Py_TPFLAGS_HAVE_INPLACEOPS)
345+
Py_TPFLAGS_HAVE_INPLACEOPS | \
346+
Py_TPFLAGS_HAVE_RICHCOMPARE | \
347+
0)
343348

344349
#define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0)
345350

0 commit comments

Comments
 (0)