mp.c: Spell `MP' and `GF' in the correct case in docstrings.
[catacomb-python] / mp.c
diff --git a/mp.c b/mp.c
index 9330121..b3ab0d2 100644 (file)
--- a/mp.c
+++ b/mp.c
@@ -894,7 +894,7 @@ static PyTypeObject mp_pytype_skel = {
 "Multiprecision integers, similar to `long' but more efficient and\n\
 versatile.  Support all the standard arithmetic operations.\n\
 \n\
-Constructor mp(X, radix = R) attempts to convert X to an `mp'.  If\n\
+Constructor MP(X, radix = R) attempts to convert X to an `MP'.  If\n\
 X is a string, it's read in radix-R form, or we look for a prefix\n\
 if R = 0.  Other acceptable things are ints and longs.\n\
 \n\
@@ -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@ */
@@ -2092,7 +2083,7 @@ static PyTypeObject gf_pytype_skel = {
 "Binary polynomials.  Support almost all the standard arithmetic\n\
 operations.\n\
 \n\
-Constructor gf(X, radix = R) attempts to convert X to a `gf'.  If\n\
+Constructor GF(X, radix = R) attempts to convert X to a `GF'.  If\n\
 X is a string, it's read in radix-R form, or we look for a prefix\n\
 if R = 0.  Other acceptable things are ints and longs.\n\
 \n\