X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/blobdiff_plain/c90f712e989f2ee557842c18fdb9a4df469c1859..8e923c6832d8ba26dbe9e97e5c3607debbe27566:/share.c diff --git a/share.c b/share.c index 16d376e..5d54947 100644 --- a/share.c +++ b/share.c @@ -241,10 +241,9 @@ end: return (0); } -static PyObject *gfsmeth_combine(PyObject *me, PyObject *arg) +static PyObject *gfsmeth_combine(PyObject *me) { PyObject *rc = 0; - if (!PyArg_ParseTuple(arg, ":combine")) goto end; if (GFSHARE_S(me)->i < GFSHARE_S(me)->t) VALERR("not enough shares yet"); rc = bytestring_pywrap(0, GFSHARE_S(me)->sz); gfshare_combine(GFSHARE_S(me), PyString_AS_STRING(rc)); @@ -256,7 +255,7 @@ static const PyMethodDef gfsharejoin_pymethods[] = { #define METHNAME(name) gfsmeth_##name METH (addedp, "S.addedp(I) -> BOOL") METH (add, "S.add(I, SHARE) -> REMAIN") - METH (combine, "S.combine() -> SECRET") + NAMETH(combine, "S.combine() -> SECRET") #undef METHNAME { 0 } }; @@ -541,10 +540,9 @@ end: return (rc); } -static PyObject *smeth_combine(PyObject *me, PyObject *arg) +static PyObject *smeth_combine(PyObject *me) { PyObject *rc = 0; - if (!PyArg_ParseTuple(arg, ":combine")) goto end; if (SHARE_S(me)->i < SHARE_S(me)->t) VALERR("not enough shares yet"); rc = mp_pywrap(share_combine(SHARE_S(me))); end: @@ -555,7 +553,7 @@ static const PyMethodDef sharejoin_pymethods[] = { #define METHNAME(name) smeth_##name METH (addedp, "S.addedp(I) -> BOOL") METH (add, "S.add(I, SHARE) -> REMAIN") - METH (combine, "S.combine() -> SECRET") + NAMETH(combine, "S.combine() -> SECRET") #undef METHNAME { 0 } };