X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/catacomb-python/blobdiff_plain/b2687a0a4b3c5e45cad7c5815a6d3805bfc8d4f1..ab5212e53b51e516f086e20b66c121d966967a9a:/group.c diff --git a/group.c b/group.c index cd3472f..1f733a0 100644 --- a/group.c +++ b/group.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Abstract group inteface * @@ -227,7 +225,7 @@ static PyObject *namedgroups(const pentry *pp, int *ne) } c = PyInt_FromLong(i); found: - PyDict_SetItemString(d, (/*unconst*/ char *)pp[i].name, c); + PyDict_SetItemString(d, (/*unconst*/ char *)p, c); Py_DECREF(c); } *ne = i; @@ -784,13 +782,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 +1049,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 } };