X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/catacomb-python/blobdiff_plain/be6df1c38491ef517f2f55f2abc9c9e64ea034b0..ab723d7332a553a47c78f33229e402a0b3618744:/mp.c diff --git a/mp.c b/mp.c index 9330121..e4f5980 100644 --- a/mp.c +++ b/mp.c @@ -1887,15 +1887,6 @@ end: return ((PyObject *)zz); } -static long gf_pyhash(PyObject *me) -{ - long i = mp_tolong(MP_X(me)); - i ^= 0xc7ecd67c; /* random perturbance */ - if (i == -1) - i = -2; - return (i); -} - static PyObject *gf_pyexp(PyObject *x, PyObject *y, PyObject *z) { mp *xx = 0, *yy = 0, *zz = 0; @@ -2078,7 +2069,7 @@ static PyTypeObject gf_pytype_skel = { &gf_pynumber, /* @tp_as_number@ */ 0, /* @tp_as_sequence@ */ 0, /* @tp_as_mapping@ */ - gf_pyhash, /* @tp_hash@ */ + mp_pyhash, /* @tp_hash@ */ 0, /* @tp_call@ */ mp_pyhex, /* @tp_str@ */ 0, /* @tp_getattro@ */