static long fe_pyhash(PyObject *me)
{
- long i = mp_tolong(FE_X(me));
- i ^= 0xdcf62d6c; /* random perturbance */
- if (i == -1)
- i = -2;
- return (i);
+ size_t sz = FE_F(me)->noctets;
+ uint32 h = 0xe0c127ca + FE_F(me)->ops->ty;
+ octet *p = xmalloc(sz);
+ mp_storeb(FE_X(me), p, sz);
+ h = unihash_hash(&unihash_global, h, p, sz);
+ xfree(p);
+ return (h % LONG_MAX);
}
static int fe_pycoerce(PyObject **x, PyObject **y)