FREEOBJ(me);
}
+static Py_hash_t key_pyhash(PyObject *me)
+ { return ((Py_hash_t)KEY_K(me)); }
+
+static PyObject *key_pyrichcompare(PyObject *me, PyObject *you, int op)
+{
+ if (!KEY_PYCHECK(you)) RETURN_NOTIMPL;
+ switch (op) {
+ case Py_EQ: return (getbool(KEY_K(me) == KEY_K(you)));
+ case Py_NE: return (getbool(KEY_K(me) == KEY_K(you)));
+ default: TYERR("ordering makes no sense");
+ }
+end:
+ return (0);
+}
+
static PyObject *kmeth_delete(PyObject *me)
{
int err;
0, /* @tp_as_number@ */
0, /* @tp_as_sequence@ */
0, /* @tp_as_mapping@ */
- 0, /* @tp_hash@ */
+ key_pyhash, /* @tp_hash@ */
0, /* @tp_call@ */
0, /* @tp_str@ */
0, /* @tp_getattro@ */
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
- 0, /* @tp_richcompare@ */
+ key_pyrichcompare, /* @tp_richcompare@ */
0, /* @tp_weaklistoffset@ */
0, /* @tp_iter@ */
0, /* @tp_iternext@ */