Hopefully fix 3-way comparisons. This unfortunately adds yet another
hack, and it's even more disgusting than a PyInstance_Check() call.
If the tp_compare slot is the slot used for overrides in Python,
it's always called.
Add some tests that show what should work too.
diff --git a/Include/object.h b/Include/object.h
index d9c3514..160331e 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -346,6 +346,10 @@
extern DL_IMPORT(void) (*PyObject_ClearWeakRefs)(PyObject *);
+/* A slot function whose address we need to compare */
+extern int _PyObject_SlotCompare(PyObject *, PyObject *);
+
+
/* PyObject_Dir(obj) acts like Python __builtin__.dir(obj), returning a
list of strings. PyObject_Dir(NULL) is like __builtin__.dir(),
returning the names of the current locals. In this case, if there are