- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O:new", kwlist, &xobj))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O:new", KWLIST, &xobj))
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:new", kwlist, convmp, &x))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:new", KWLIST, convmp, &x))
goto end;
if (!MP_POSP(x) || MP_EVENP(x)) VALERR("must be positive and odd");
o = (rabin_pyobj *)ty->tp_alloc(ty, 0);
goto end;
if (!MP_POSP(x) || MP_EVENP(x)) VALERR("must be positive and odd");
o = (rabin_pyobj *)ty->tp_alloc(ty, 0);
- char *meth[] = {
- "pg_abort", "pg_done", "pg_begin", "pg_try", "pg_fail", "pg_pass"
- };
+ static const char *const meth[] =
+ { "pg_abort", "pg_done", "pg_begin", "pg_try", "pg_fail", "pg_pass" };
- if ((rc = PyObject_CallMethod(pg->obj, meth[rq], "(O)", pyev)) == 0)
+ if ((rc = PyObject_CallMethod(pg->obj, (/*unconst*/ char *)meth[rq],
+ "(O)", pyev)) == 0)
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:new", kwlist, convmpw, &s))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:new", KWLIST, convmpw, &s))
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O:new", kwlist, &o) ||
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O:new", KWLIST, &o) ||
(fobj = pfilt_pymake(pfilt_pytype, o)) == 0)
goto end;
rc = (pgjump_pyobj *)ty->tp_alloc(ty, 0);
(fobj = pfilt_pymake(pfilt_pytype, o)) == 0)
goto end;
rc = (pgjump_pyobj *)ty->tp_alloc(ty, 0);
- if (!PyArg_ParseTupleAndKeywords(arg, kw, ":new", kwlist)) goto end;
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, ":new", KWLIST)) goto end;
struct excinfo exc = EXCINFO_INIT;
pypgev step = { { 0 } }, test = { { 0 } }, evt = { { 0 } };
unsigned nsteps = 0, ntests = 0;
struct excinfo exc = EXCINFO_INIT;
pypgev step = { { 0 } }, test = { { 0 } }, evt = { { 0 } };
unsigned nsteps = 0, ntests = 0;
- char *kwlist[] = { "start", "name", "stepper", "tester", "event",
- "nsteps", "ntests", 0 };
+ static const char *const kwlist[] =
+ { "start", "name", "stepper", "tester", "event", "nsteps", "ntests", 0 };
step.exc = &exc; step.ev.proc = pgen_filter; step.ev.ctx = &fc;
test.exc = &exc; test.ev.proc = pgen_test; test.ev.ctx = &tc;
evt.exc = &exc;
step.exc = &exc; step.ev.proc = pgen_filter; step.ev.ctx = &fc;
test.exc = &exc; test.ev.proc = pgen_test; test.ev.ctx = &tc;
evt.exc = &exc;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|sO&O&O&O&O&:pgen", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|sO&O&O&O&O&:pgen", KWLIST,
convmp, &x, &p, convpgev, &step,
convpgev, &test, convpgev, &evt,
convuint, &nsteps, convuint, &ntests))
convmp, &x, &p, convpgev, &step,
convpgev, &test, convpgev, &evt,
convuint, &nsteps, convuint, &ntests))
- char *kwlist[] = { "nbits", "name", "event", "rng", "nsteps", 0 };
+ static const char *const kwlist[] =
+ { "nbits", "name", "event", "rng", "nsteps", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|sO&O&O&", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|sO&O&O&", KWLIST,
convuint, &nbits, &name,
convpgev, &evt, convgrand, &r,
convuint, &n))
convuint, &nbits, &name,
convpgev, &evt, convgrand, &r,
convuint, &n))
- char *kwlist[] = { "nbits", "name", "event", "rng", "nsteps", 0 };
+ static const char *const kwlist[] =
+ { "nbits", "name", "event", "rng", "nsteps", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|sO&O&O&", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|sO&O&O&", KWLIST,
convuint, &nbits, &name,
convpgev, &evt, convgrand, &r,
convuint, &n))
convuint, &nbits, &name,
convpgev, &evt, convgrand, &r,
convuint, &n))
- char *kwlist[] = { "pbits", "qbits", "name", "event", "ievent",
- "rng", "nsteps", 0 };
+ static const char *const kwlist[] =
+ { "pbits", "qbits", "name", "event", "ievent", "rng", "nsteps", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&|sO&O&O&O&:limlee", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&|sO&O&O&O&:limlee", KWLIST,
convuint, &pl, convuint, &ql,
&p, convpgev, &oe, convpgev, &ie,
convgrand, &r, convuint, &on))
convuint, &pl, convuint, &ql,
&p, convpgev, &oe, convpgev, &ie,
convgrand, &r, convuint, &on))