X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/blobdiff_plain/24b3d57bcf320d9d7a90a40d5f6176b1f087ab3e..49915b4a09cc89ccd426b29f7113b380828361d3:/group.c diff --git a/group.c b/group.c index fe05f15..001eb19 100644 --- a/group.c +++ b/group.c @@ -7,7 +7,7 @@ * (c) 2004 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of the Python interface to Catacomb. * @@ -15,12 +15,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * Catacomb/Python is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with Catacomb/Python; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -231,7 +231,7 @@ static PyObject *namedgroups(const pentry *pp, int *ne) Py_DECREF(c); } *ne = i; - return (d); + return (d); } static PyObject *meth__groupn(PyObject *me, PyObject *arg, @@ -269,7 +269,7 @@ static PyObject *meth__parse(PyObject *me, PyObject *arg, PyTypeObject *ty, if (parse(&qd, &gp)) SYNERR(qd.e); rc = fginfo_pywrap(&gp, ty); end: - return (rc); + return (rc); } static PyObject *meth__DHInfo_parse(PyObject *me, PyObject *arg) @@ -468,7 +468,7 @@ group *group_copy(group *g) gb.p = gc->r.p; gb.q = gc->g.r; g = group_binary(&gb); - MP_DROP(gb.g); + MP_DROP(gb.g); } else if (strcmp(G_NAME(g), "ec") == 0) { gctx_ec *gc = (gctx_ec *)g; ec_info ei; @@ -784,13 +784,13 @@ static PyObject *gmeth_mexp(PyObject *me, PyObject *arg) gmexp_id, gmexp_fill, gmexp_exp, gmexp_drop)); } -static PyObject *gmeth_check(PyObject *me, PyObject *arg, PyObject *kw) +static PyObject *gmeth_checkgroup(PyObject *me, PyObject *arg, PyObject *kw) { char *kwlist[] = { "rng", 0 }; grand *r = &rand_global; const char *p; - if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:check", kwlist, + if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:checkgroup", kwlist, convgrand, &r)) goto end; if ((p = G_CHECK(GROUP_G(me), r)) != 0) @@ -1051,7 +1051,7 @@ static PyMethodDef group_pymethods[] = { #define METHNAME(name) gmeth_##name METH (mexp, "\ G.mexp([(X0, N0), (X1, N1), ...]) -> X0^N0 X1^N1 ...") - KWMETH(check, "G.check(rand = random): check group is good") + KWMETH(checkgroup, "G.checkgroup(rand = random): check group is good") #undef METHNAME { 0 } }; @@ -1350,10 +1350,10 @@ static PyMethodDef methods[] = { METH (_BinDHInfo__groupn, 0) KWMETH(_DHInfo_generate, "\ generate(PBITS, [qbits = 0, event = pgen_nullev,\n\ - rng = rand, nsteps = 0]) -> D") + rng = rand, nsteps = 0]) -> D") KWMETH(_DHInfo_genlimlee, "\ genlimlee(PBITS, QBITS, [event = pgen_nullev, ievent = pgen_nullev,\n\ - rng = rand, nsteps = 0, subgroupp = True]) -> (D, [Q, ...])") + rng = rand, nsteps = 0, subgroupp = True]) -> (D, [Q, ...])") KWMETH(_DHInfo_gendsa, "\ gendsa(PBITS, QBITS, SEED, [event = pgen_nullev, nsteps = 0])\n\ -> (D, SEED, COUNT)")