From: Mark Wooding Date: Sat, 17 Feb 2007 12:18:40 +0000 (+0000) Subject: Rename the class `check' method to `checkgroup'. X-Git-Tag: 1.0.1~11 X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/commitdiff_plain/00a8b95ada5b1bf6d4dae66249c075a691c630b2 Rename the class `check' method to `checkgroup'. Otherwise it interferes with the element `check' method, which gets used by preference. --- diff --git a/group.c b/group.c index cd3472f..001eb19 100644 --- a/group.c +++ b/group.c @@ -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 } };