*.c: Use the new `Py_hash_t' type.
[catacomb-python] / mp.c
diff --git a/mp.c b/mp.c
index 93dd137..99a84d1 100644 (file)
--- a/mp.c
+++ b/mp.c
@@ -545,14 +545,14 @@ end:
   return ((PyObject *)zz);
 }
 
-long mphash(mp *x)
+Py_hash_t mphash(mp *x)
 {
   PyObject *l = mp_topylong(x);
-  long h = PyObject_Hash(l);
+  Py_hash_t h = PyObject_Hash(l);
   Py_DECREF(l); return (h);
 }
 
-static long mp_pyhash(PyObject *me) { return (mphash(MP_X(me))); }
+static Py_hash_t mp_pyhash(PyObject *me) { return (mphash(MP_X(me))); }
 
 static PyObject *mpmeth_jacobi(PyObject *me, PyObject *arg)
 {