algorithms.c: Fix longstanding ugly hack with new `MEMRNM' macro.
[catacomb-python] / pubkey.c
index 6084c3d..2c906cd 100644 (file)
--- a/pubkey.c
+++ b/pubkey.c
@@ -108,11 +108,8 @@ end:
   return (rc);
 }
 
-static PyObject *dsameth_beginhash(PyObject *me, PyObject *arg)
-{
-  if (!PyArg_ParseTuple(arg, ":beginhash")) return (0);
-  return (ghash_pywrap(DSA_HASH(me), gdsa_beginhash(DSA_D(me))));
-}
+static PyObject *dsameth_beginhash(PyObject *me)
+  { return (ghash_pywrap(DSA_HASH(me), gdsa_beginhash(DSA_D(me)))); }
 
 static PyObject *dsameth_endhash(PyObject *me, PyObject *arg)
 {
@@ -190,7 +187,7 @@ end:
 
 static const PyMethodDef dsapub_pymethods[] = {
 #define METHNAME(name) dsameth_##name
-  METH (beginhash,     "D.beginhash() -> hash object")
+  NAMETH(beginhash,    "D.beginhash() -> hash object")
   METH (endhash,       "D.endhash(H) -> BYTES")
   METH (verify,        "D.verify(MSG, (R, S)) -> true/false")
 #undef METHNAME
@@ -363,11 +360,8 @@ end:
   return (rc);
 }
 
-static PyObject *kcdsameth_beginhash(PyObject *me, PyObject *arg)
-{
-  if (!PyArg_ParseTuple(arg, ":beginhash")) return (0);
-  return (ghash_pywrap(DSA_HASH(me), gkcdsa_beginhash(DSA_D(me))));
-}
+static PyObject *kcdsameth_beginhash(PyObject *me)
+  { return (ghash_pywrap(DSA_HASH(me), gkcdsa_beginhash(DSA_D(me)))); }
 
 static PyObject *kcdsameth_endhash(PyObject *me, PyObject *arg)
 {
@@ -428,7 +422,7 @@ end:
 
 static const PyMethodDef kcdsapub_pymethods[] = {
 #define METHNAME(name) kcdsameth_##name
-  METH (beginhash,     "D.beginhash() -> hash object")
+  NAMETH(beginhash,    "D.beginhash() -> hash object")
   METH (endhash,       "D.endhash(H) -> BYTES")
   METH (verify,        "D.verify(MSG, (R, S)) -> true/false")
 #undef METHNAME