static PyObject *keyszany_pynew(PyTypeObject *ty,
PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { "default", 0 };
+ static const char *const kwlist[] = { "default", 0 };
int dfl;
keysz_pyobj *o;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "i:new", kwlist, &dfl))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "i:new", KWLIST, &dfl))
goto end;
if (dfl < 0) VALERR("key size cannot be negative");
o = (keysz_pyobj *)ty->tp_alloc(ty, 0);
static PyObject *keyszrange_pynew(PyTypeObject *ty,
PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { "default", "min", "max", "mod", 0 };
+ static const char *const kwlist[] = { "default", "min", "max", "mod", 0 };
int dfl, min = 0, max = 0, mod = 1;
keyszrange_pyobj *o;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "i|iii:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "i|iii:new", KWLIST,
&dfl, &min, &max, &mod))
goto end;
if (dfl < 0 || min < 0) VALERR("key size cannot be negative");
static PyObject *keyszset_pynew(PyTypeObject *ty,
PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { "default", "set", 0 };
+ static const char *const kwlist[] = { "default", "set", 0 };
int dfl, i, n, xx;
PyObject *set = 0;
PyObject *x = 0, *l = 0;
keyszset_pyobj *o = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "i|O:new", kwlist, &dfl, &set))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "i|O:new", KWLIST, &dfl, &set))
goto end;
if (!set) set = PyTuple_New(0);
else Py_INCREF(set);
static PyObject *gcipher_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { "k", 0 };
+ static const char *const kwlist[] = { "k", 0 };
char *k;
Py_ssize_t sz;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#:new", kwlist, &k, &sz))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#:new", KWLIST, &k, &sz))
goto end;
if (keysz(sz, GCCIPHER_CC(ty)->keysz) != sz) VALERR("bad key length");
return (gcipher_pywrap((PyObject *)ty,
static PyObject *ghash_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, ":new", kwlist))
+ static const char *const kwlist[] = { 0 };
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, ":new", KWLIST))
goto end;
return (ghash_pywrap((PyObject *)ty, GH_INIT(GCHASH_CH(ty)), f_freeme));
end:
static PyObject *gmac_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { "k", 0 };
+ static const char *const kwlist[] = { "k", 0 };
char *k;
Py_ssize_t sz;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#:new", kwlist, &k, &sz))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#:new", KWLIST, &k, &sz))
goto end;
if (keysz(sz, GCMAC_CM(ty)->keysz) != sz) VALERR("bad key length");
return (gmac_pywrap((PyObject *)ty,
static PyObject *gmhash_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { 0 };
+ static const char *const kwlist[] = { 0 };
ghash_pyobj *g;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, ":new", kwlist)) return (0);
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, ":new", KWLIST)) return (0);
g = PyObject_NEW(ghash_pyobj, ty);
g->h = GM_INIT(GMAC_M(ty));
g->f = f_freeme;
static PyObject *poly1305hash_pynew(PyTypeObject *ty,
PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { "mask", 0 };
+ static const char *const kwlist[] = { "mask", 0 };
poly1305key_pyobj *pk = (poly1305key_pyobj *)ty;
poly1305hash_pyobj *ph;
char *m = 0;
Py_ssize_t sz;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|s#:new", kwlist, &m, &sz))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|s#:new", KWLIST, &m, &sz))
return (0);
if (m && sz != POLY1305_MASKSZ) VALERR("bad mask length");
ph = PyObject_NEW(poly1305hash_pyobj, ty);
static PyObject *poly1305key_pynew(PyTypeObject *ty,
PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { "k", 0 };
+ static const char *const kwlist[] = { "k", 0 };
poly1305key_pyobj *pk;
char *k;
Py_ssize_t sz;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#:new", kwlist, &k, &sz))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#:new", KWLIST, &k, &sz))
goto end;
if (keysz(sz, poly1305_keysz) != sz) VALERR("bad key length");
{
unsigned n = 24;
kxvik_pyobj *rc = 0;
- char *kwlist[] = { "nround", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:new", kwlist,
+ static const char *const kwlist[] = { "nround", 0 };
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:new", KWLIST,
convuint, &n))
goto end;
rc = (kxvik_pyobj *)ty->tp_alloc(ty, 0);
shake_pyobj *rc = 0;
char *p = 0, *f = 0;
Py_ssize_t psz = 0, fsz = 0;
- char *kwlist[] = { "perso", "func", 0 };
+ static const char *const kwlist[] = { "perso", "func", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|s#s#:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|s#s#:new", KWLIST,
&p, &psz, &f, &fsz))
goto end;
rc = (shake_pyobj *)ty->tp_alloc(ty, 0);
static PyObject *gprp_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { "key", 0 };
+ static const char *const kwlist[] = { "key", 0 };
char *k;
Py_ssize_t sz;
const prpinfo *prp = GCPRP_PRP(ty);
PyObject *me;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#:new", kwlist, &k, &sz))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#:new", KWLIST, &k, &sz))
goto end;
if (keysz(sz, prp->keysz) != sz) VALERR("bad key length");
me = (PyObject *)ty->tp_alloc(ty, 0);
char *p, *q;
Py_ssize_t n;
buf_pyobj *me = 0;
- static char *kwlist[] = { "data", 0 };
+ static const char *const kwlist[] = { "data", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#:new", kwlist, &p, &n))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#:new", KWLIST, &p, &n))
goto end;
q = xmalloc(n);
memcpy(q, p, n);
static PyObject *rbmeth_getecpt(PyObject *me, PyObject *arg, PyObject *kw)
{
PyObject *cobj = Py_None;
- static char *kwlist[] = { "curve", 0 };
+ static const char *const kwlist[] = { "curve", 0 };
ec pt = EC_INIT;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O:getecpt", kwlist, &cobj))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O:getecpt", KWLIST, &cobj))
goto end;
if (cobj == Py_None) cobj = (PyObject *)ecpt_pytype;
if (!PyType_Check(cobj) ||
char *p;
size_t n = 64;
buf_pyobj *me = 0;
- static char *kwlist[] = { "size", 0 };
+ static const char *const kwlist[] = { "size", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:new", KWLIST,
convszt, &n))
goto end;
me = (buf_pyobj *)ty->tp_alloc(ty, 0);
{
const char *p;
Py_ssize_t n;
- static char *kwlist[] = { "data", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#:new", kwlist, &p, &n))
+ static const char *const kwlist[] = { "data", 0 };
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#:new", KWLIST, &p, &n))
return (0);
return (dowrap(ty, p, n));
}
return (d); \
}
+#define KWLIST (/*unconst*/ char **)kwlist
+
struct nameval { const char *name; unsigned long value; };
extern void setconstants(PyObject *, const struct nameval *);
ec pp = EC_INIT;
int f = EC_EXPLY;
int len;
- char *kwlist[] = { "flags", 0 };
+ static const char *const kwlist[] = { "flags", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|i:ectosp", kwlist, &f))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|i:ectosp", KWLIST, &f))
return (0);
len = c->f->noctets * 2 + 1;
rc = bytestring_pywrap(0, len);
{
PyObject *x = 0, *y = 0, *z = 0;
ec p = EC_INIT;
- char *kwlist[] = { "x", "y", 0 };
+ static const char *const kwlist[] = { "x", "y", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|OO:new", kwlist, &x, &y) ||
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|OO:new", KWLIST, &x, &y) ||
ecptxl(0, &p, x, y, z))
goto end;
return (ecpt_pywrapout(ty, &p));
{
PyObject *x = 0, *y = 0, *z = 0;
ec p = EC_INIT;
- char *kwlist[] = { "x", "y", "z", 0 };
+ static const char *const kwlist[] = { "x", "y", "z", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|OOO:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|OOO:new", KWLIST,
&x, &y, &z) ||
ecptxl(ECCURVE_C(ty), &p, x, y, z))
goto end;
ec_curve *cc;
int f = EC_XONLY | EC_LSB | EC_SORT | EC_EXPLY;
ec pp = EC_INIT;
- char *kwlist[] = { "buf", "flags", 0 };
+ static const char *const kwlist[] = { "buf", "flags", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "Os#|f:os2ecp", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "Os#|f:os2ecp", KWLIST,
&me, &p, &len, &f))
return (0);
buf_init(&b, p, len);
static PyObject *ecmeth_rand(PyObject *me, PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { "rng", 0 };
+ static const char *const kwlist[] = { "rng", 0 };
grand *r = &rand_global;
ec p = EC_INIT;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:rand", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:rand", KWLIST,
convgrand, &r))
return (0);
ec_rand(ECCURVE_C(me), &p, r);
{
PyObject *fobj;
PyObject *cobj = 0;
- char *kwlist[] = { "field", "a", "b", 0 };
+ static const char *const kwlist[] = { "field", "a", "b", 0 };
mp *aa = 0, *bb = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!O&O&", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!O&O&", KWLIST,
field_pytype, &fobj,
convmp, &aa, convmp, &bb))
goto end;
{
ec_info ei = { 0 };
PyObject *e, *g;
- char *kwlist[] = { "curve", "G", "r", "h", 0 };
+ static const char *const kwlist[] = { "curve", "G", "r", "h", 0 };
ecinfo_pyobj *rc = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!O!O&O&:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!O!O&O&:new", KWLIST,
eccurve_pytype, &e, ecpt_pytype, &g,
convmp, &ei.r, convmp, &ei.h))
goto end;
static PyObject *eimeth_check(PyObject *me, PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { "rng", 0 };
+ static const char *const kwlist[] = { "rng", 0 };
grand *r = &rand_global;
const char *p;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:check", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:check", KWLIST,
convgrand, &r))
goto end;
if ((p = ec_checkinfo(ECINFO_EI(me), r)) != 0)
{
PyObject *x;
mp *z;
- char *kwlist[] = { "x", 0 };
+ static const char *const kwlist[] = { "x", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O:fe", kwlist, &x))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O:fe", KWLIST, &x))
return (0);
if (FE_PYCHECK(x) && FE_F(x) == FIELD_F(ty)) RETURN_OBJ(x);
if ((z = getmp(x)) == 0) return (0);
static PyObject *fmeth_rand(PyObject *me, PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { "rng", 0 };
+ static const char *const kwlist[] = { "rng", 0 };
grand *r = &rand_global;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:rand", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:rand", KWLIST,
convgrand, &r))
return (0);
return (fe_pywrap(me, F_RAND(FIELD_F(me), MP_NEW, r)));
{
mp *xx = 0;
field *f;
- char *kwlist[] = { "p", 0 };
+ static const char *const kwlist[] = { "p", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:primefield", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:primefield", KWLIST,
convmp, &xx))
goto end;
if ((f = field_prime(xx)) == 0)
{
mp *xx = 0;
field *f;
- char *kwlist[] = { "p", 0 };
+ static const char *const kwlist[] = { "p", 0 };
if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:niceprimefield",
- kwlist, convmp, &xx))
+ KWLIST, convmp, &xx))
goto end;
if ((f = field_niceprime(xx)) == 0)
VALERR("bad prime for niceprimefield");
{
mp *xx = 0;
field *f;
- char *kwlist[] = { "p", 0 };
+ static const char *const kwlist[] = { "p", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:binpolyfield", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:binpolyfield", KWLIST,
convgf, &xx))
goto end;
if ((f = field_binpoly(xx)) == 0) VALERR("bad poly for binpolyfield");
{
mp *xx = 0, *yy = 0;
field *f;
- char *kwlist[] = { "p", "beta", 0 };
+ static const char *const kwlist[] = { "p", "beta", 0 };
if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&:binnormfield",
- kwlist, convgf, &xx, convgf, &yy))
+ KWLIST, convgf, &xx, convgf, &yy))
goto end;
if ((f = field_binnorm(xx, yy)) == 0) VALERR("bad args for binnormfield");
MP_DROP(xx); MP_DROP(yy);
static PyObject *fginfo_pynew(PyTypeObject *ty,
PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { "p", "r", "g", 0 };
+ static const char *const kwlist[] = { "p", "r", "g", 0 };
gprime_param dp = { 0 };
fginfo_pyobj *z = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&O&:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&O&:new", KWLIST,
convmp, &dp.p,
convmp, &dp.q,
convmp, &dp.g))
unsigned steps = 0;
grand *r = &rand_global;
pgev evt = { 0 };
- char *kwlist[] =
+ static const char *const kwlist[] =
{ "class", "pbits", "qbits", "event", "rng", "nsteps", 0 };
PyObject *rc = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "OO&|O&O&O&O&:generate", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "OO&|O&O&O&O&:generate", KWLIST,
&me, convuint, &pl, convuint, &ql,
convpgev, &evt, convgrand, &r,
convuint, &steps))
pgev oe = { 0 }, ie = { 0 };
int subgroupp = 1;
unsigned f = 0;
- char *kwlist[] = { "class", "pbits", "qbits", "event", "ievent",
- "rng", "nsteps", "subgroupp", 0 };
+ static const char *const kwlist[] = {
+ "class", "pbits", "qbits", "event", "ievent",
+ "rng", "nsteps", "subgroupp", 0
+ };
size_t i, nf;
mp **v = 0;
PyObject *rc = 0, *vec = 0;
if (!PyArg_ParseTupleAndKeywords(arg, kw,
- "OO&O&|O&O&O&O&O&:genlimlee", kwlist,
+ "OO&O&|O&O&O&O&O&:genlimlee", KWLIST,
&me, convuint, &pl, convuint, &ql,
convpgev, &oe, convpgev, &ie,
convgrand, &r, convuint, &steps,
unsigned steps = 0;
grand *r = &rand_global;
pgev evt = { 0 };
- char *kwlist[] = { "class", "pbits", "qbits",
- "event", "rng", "nsteps", 0 };
+ static const char *const kwlist[] =
+ { "class", "pbits", "qbits", "event", "rng", "nsteps", 0 };
mp *v = MP_NEW;
PyObject *rc = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "OO&O&|O&O&O&:genkcdsa", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "OO&O&|O&O&O&:genkcdsa", KWLIST,
&me, convuint, &pl, convuint, &ql,
convpgev, &evt, convgrand, &r,
convuint, &steps))
char *k;
Py_ssize_t ksz;
pgev evt = { 0 };
- char *kwlist[] =
+ static const char *const kwlist[] =
{ "class", "pbits", "qbits", "seed", "event", "nsteps", 0 };
PyObject *rc = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "OO&O&s#|O&O&:gendsa", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "OO&O&s#|O&O&:gendsa", KWLIST,
&me, convuint, &pl, convuint, &ql,
&k, &ksz, convpgev, &evt,
convuint, &steps))
static PyObject *ge_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { "x", 0 };
+ static const char *const kwlist[] = { "x", 0 };
PyObject *x;
group *g;
ec p = EC_INIT;
mptext_stringctx sc;
g = GROUP_G(ty);
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O:new", kwlist, &x)) goto end;
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O:new", KWLIST, &x)) goto end;
xx = G_CREATE(g);
if (ECPT_PYCHECK(x)) {
getecptout(&p, x);
static PyObject *gemeth_toec(PyObject *me, PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { "curve", 0 };
+ static const char *const kwlist[] = { "curve", 0 };
PyTypeObject *cty = 0;
PyObject *rc = 0;
group *g;
ec_curve *c;
ec p = EC_INIT;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O:toec", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O:toec", KWLIST,
&cty)) goto end;
g = GROUP_G(GE_GOBJ(me));
if (cty) {
static PyObject *gmeth_checkgroup(PyObject *me, PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { "rng", 0 };
+ static const char *const kwlist[] = { "rng", 0 };
grand *r = &rand_global;
const char *p;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:checkgroup", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:checkgroup", KWLIST,
convgrand, &r))
goto end;
if ((p = G_CHECK(GROUP_G(me), r)) != 0)
PyObject *arg, PyObject *kw)
{
PyObject *i;
- char *kwlist[] = { "info", 0 };
+ static const char *const kwlist[] = { "info", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!:new", KWLIST,
dhinfo_pytype, &i))
return (0);
return (group_dopywrap(ty, group_prime(FGINFO_DP(i))));
PyObject *arg, PyObject *kw)
{
PyObject *i;
- char *kwlist[] = { "info", 0 };
+ static const char *const kwlist[] = { "info", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!:new", KWLIST,
bindhinfo_pytype, &i))
return (0);
return (group_dopywrap(ty, group_binary(FGINFO_DP(i))));
{
PyObject *i;
ec_info ei;
- char *kwlist[] = { "info", 0 };
+ static const char *const kwlist[] = { "info", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!:new", KWLIST,
ecinfo_pytype, &i))
return (0);
ecinfo_copy(&ei, ECINFO_EI(i));
static PyObject *kdmeth_copy(PyObject *me, PyObject *arg, PyObject *kw)
{
key_filter f = { 0, 0 };
- static char *kwlist[] = { "filter", 0 };
+ static const char *const kwlist[] = { "filter", 0 };
key_data *kd;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:copy", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:copy", KWLIST,
convfilter, &f))
return (0);
if ((kd = key_copydata(KEYDATA_KD(me), &f)) == 0)
key_filter f = { 0, 0 };
dstr d = DSTR_INIT;
PyObject *rc = 0;
- static char *kwlist[] = { "filter", 0 };
+ static const char *const kwlist[] = { "filter", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:write", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:write", KWLIST,
convfilter, &f))
return (0);
key_write(KEYDATA_KD(me), &d, &f);
key_filter f = { 0, 0 };
dstr d = DSTR_INIT;
PyObject *rc = 0;
- static char *kwlist[] = { "filter", 0 };
+ static const char *const kwlist[] = { "filter", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:encode", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:encode", KWLIST,
convfilter, &f))
return (0);
key_encode(KEYDATA_KD(me), &d, &f);
Py_ssize_t n;
unsigned f = 0;
keydata_pyobj *me = 0;
- static char *kwlist[] = { "key", "flags", 0 };
+ static const char *const kwlist[] = { "key", "flags", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#|O&:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#|O&:new", KWLIST,
&p, &n, convflags, &f))
goto end;
me = (keydata_pyobj *)ty->tp_alloc(ty, 0);
Py_ssize_t n;
unsigned f = 0;
keydata_pyobj *me = 0;
- static char *kwlist[] = { "key", "flags", 0 };
+ static const char *const kwlist[] = { "key", "flags", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#|O&:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#|O&:new", KWLIST,
&p, &n, convflags, &f))
goto end;
me = (keydata_pyobj *)ty->tp_alloc(ty, 0);
mp *x = 0;
unsigned f = 0;
keydata_pyobj *me = 0;
- static char *kwlist[] = { "key", "flags", 0 };
+ static const char *const kwlist[] = { "key", "flags", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|O&:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|O&:new", KWLIST,
convmp, &x, convflags, &f))
goto end;
me = (keydata_pyobj *)ty->tp_alloc(ty, 0);
char *p;
unsigned f = 0;
keydata_pyobj *me = 0;
- static char *kwlist[] = { "key", "flags", 0 };
+ static const char *const kwlist[] = { "key", "flags", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s|O&:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s|O&:new", KWLIST,
&p, convflags, &f))
goto end;
me = (keydata_pyobj *)ty->tp_alloc(ty, 0);
ec x = EC_INIT;
unsigned f = 0;
keydata_pyobj *me = 0;
- static char *kwlist[] = { "key", "flags", 0 };
+ static const char *const kwlist[] = { "key", "flags", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|O&:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|O&:new", KWLIST,
convecpt, &x, convflags, &f))
goto end;
me = (keydata_pyobj *)ty->tp_alloc(ty, 0);
char *p;
keydata_pyobj *me = 0;
key_data *kd = 0;
- static char *kwlist[] = { "subkeys", 0 };
+ static const char *const kwlist[] = { "subkeys", 0 };
Py_XINCREF(arg); Py_XINCREF(kw);
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O:new", kwlist, &sub))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O:new", KWLIST, &sub))
goto end;
kd = key_newstruct();
if (sub) {
uint32 id;
char *type;
unsigned long exptime = KEXP_FOREVER;
- static char *kwlist[] = { "keyfile", "id", "type", "exptime", 0 };
+ static const char *const kwlist[] =
+ { "keyfile", "id", "type", "exptime", 0 };
key *k;
int err;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!O&s|O&:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!O&s|O&:new", KWLIST,
keyfile_pytype, &kfobj, convu32, &id,
&type, convulong, &exptime))
goto end;
PyObject *nameobj;
char *name;
FILE *fp;
- static char *kwlist[] = { "file", "filter", 0 };
+ static const char *const kwlist[] = { "file", "filter", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!|O&:extract", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!|O&:extract", KWLIST,
&PyFile_Type, &file,
convfilter, &f) ||
(fp = PyFile_AsFile(file)) == 0 ||
{
ghash *h;
key_filter f = { KF_NONSECRET, KF_NONSECRET };
- static char *kwlist[] = { "hash", "filter", 0 };
+ static const char *const kwlist[] = { "hash", "filter", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|O&:fingerprint", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|O&:fingerprint", KWLIST,
convghash, &h, convfilter, &f))
return (0);
return (getbool(key_fingerprint(KEY_K(me), h, &f)));
char *file = 0;
unsigned how = KOPEN_READ;
keyfile_pyobj *rc = 0;
- static char *kwlist[] = { "file", "how", "report", 0 };
+ static const char *const kwlist[] = { "file", "how", "report", 0 };
Py_XINCREF(arg); Py_XINCREF(kw);
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s|iO:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s|iO:new", KWLIST,
&file, &how, &ri.func))
goto end;
if (ri.func && !PyCallable_Check(ri.func))
PyObject *x = 0;
FILE *fp = 0;
int rc;
- static char *kwlist[] = { "file", "report", 0 };
+ static const char *const kwlist[] = { "file", "report", 0 };
Py_XINCREF(arg); Py_XINCREF(kw);
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!|O:merge", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!|O:merge", KWLIST,
&PyFile_Type, &x, &ri.func))
goto end;
if (ri.func && !PyCallable_Check(ri.func))
uint32 id;
char *type;
long exptime = KEXP_FOREVER;
- static char *kwlist[] = { "id", "type", "exptime", 0 };
+ static const char *const kwlist[] = { "id", "type", "exptime", 0 };
key *k;
int err;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&s|l:newkey", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&s|l:newkey", KWLIST,
convu32, &id, &type, &exptime))
goto end;
if ((err = key_new(KEYFILE_KF(me), id, type, exptime, &k)) != 0)
char *tag;
dstr d = DSTR_INIT;
PyObject *rc = 0;
- static char *kwlist[] = { "tag", "new", 0 };
+ static const char *const kwlist[] = { "tag", "new", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s|O!:qtag", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s|O!:qtag", KWLIST,
&tag, keydata_pytype, &newkdobj))
goto end;
if (key_qtag(KEYFILE_KF(me), tag, &d, &k, &kd))
mp *z;
mp_pyobj *zz = 0;
int radix = 0;
- char *kwlist[] = { "x", "radix", 0 };
+ static const char *const kwlist[] = { "x", "radix", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O|i:new", kwlist, &x, &radix))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O|i:new", KWLIST, &x, &radix))
goto end;
if (MP_PYCHECK(x)) RETURN_OBJ(x);
if (!good_radix_p(radix, 1)) VALERR("bad radix");
static PyObject *mpmeth_tostring(PyObject *me, PyObject *arg, PyObject *kw)
{
int radix = 10;
- char *kwlist[] = { "radix", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|i:tostring", kwlist, &radix))
+ static const char *const kwlist[] = { "radix", 0 };
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|i:tostring", KWLIST, &radix))
goto end;
if (!good_radix_p(radix, 0)) VALERR("bad radix");
return (mp_topystring(MP_X(me), radix, 0, 0, 0));
PyObject *arg, PyObject *kw) \
{ \
long len = -1; \
- char *kwlist[] = { "len", 0 }; \
+ static const char *const kwlist[] = { "len", 0 }; \
PyObject *rc = 0; \
\
if (!PyArg_ParseTupleAndKeywords(arg, kw, "|l:" #name, \
- kwlist, &len)) \
+ KWLIST, &len)) \
goto end; \
if (len < 0) { \
len = mp_octets##c(MP_X(me)); \
static PyObject *mpmeth_primep(PyObject *me, PyObject *arg, PyObject *kw)
{
grand *r = &rand_global;
- char *kwlist[] = { "rng", 0 };
+ static const char *const kwlist[] = { "rng", 0 };
PyObject *rc = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&", kwlist, convgrand, &r))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&", KWLIST, convgrand, &r))
goto end;
rc = getbool(pgen_primep(MP_X(me), r));
end:
PyObject *z = 0;
mp *zz;
mptext_stringctx sc;
- char *kwlist[] = { "class", "x", "radix", 0 };
+ static const char *const kwlist[] = { "class", "x", "radix", 0 };
if (!PyArg_ParseTupleAndKeywords(arg, kw, "Os#|i:fromstring",
- kwlist, &me, &p, &len, &r))
+ KWLIST, &me, &p, &len, &r))
goto end;
if (!good_radix_p(r, 1)) VALERR("bad radix");
sc.buf = p; sc.lim = p + len;
static PyObject *mpmont_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
{
mpmont_pyobj *mm = 0;
- char *kwlist[] = { "m", 0 };
+ static const char *const kwlist[] = { "m", 0 };
mp *xx = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:new", kwlist, convmp, &xx))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:new", KWLIST, convmp, &xx))
goto end;
if (!MP_POSP(xx) || !MP_ODDP(xx)) VALERR("m must be positive and odd");
mm = (mpmont_pyobj *)ty->tp_alloc(ty, 0);
PyObject *arg, PyObject *kw)
{
mpbarrett_pyobj *mb = 0;
- char *kwlist[] = { "m", 0 };
+ static const char *const kwlist[] = { "m", 0 };
mp *xx = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:new", kwlist, convmp, &xx))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:new", KWLIST, convmp, &xx))
goto end;
if (!MP_POSP(xx)) VALERR("m must be positive");
mb = (mpbarrett_pyobj *)ty->tp_alloc(ty, 0);
{
mpreduce_pyobj *mr = 0;
mpreduce r;
- char *kwlist[] = { "m", 0 };
+ static const char *const kwlist[] = { "m", 0 };
mp *xx = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:new", kwlist, convmp, &xx))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:new", KWLIST, convmp, &xx))
goto end;
if (!MP_POSP(xx)) VALERR("m must be positive");
if (mpreduce_create(&r, xx)) VALERR("bad modulus (must be 2^k - ...)");
{
mpcrt_mod *v = 0;
int n, i = 0;
- char *kwlist[] = { "mv", 0 };
+ static const char *const kwlist[] = { "mv", 0 };
PyObject *q = 0, *x;
mp *xx;
mpcrt_pyobj *c = 0;
if (PyTuple_Size(arg) > 1)
q = arg;
- else if (!PyArg_ParseTupleAndKeywords(arg, kw, "O:new", kwlist, &q))
+ else if (!PyArg_ParseTupleAndKeywords(arg, kw, "O:new", KWLIST, &q))
goto end;
Py_INCREF(q);
if (!PySequence_Check(q)) TYERR("want a sequence of moduli");
mp *z;
mp_pyobj *zz = 0;
int radix = 0;
- char *kwlist[] = { "x", "radix", 0 };
+ static const char *const kwlist[] = { "x", "radix", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O|i:gf", kwlist, &x, &radix))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O|i:gf", KWLIST, &x, &radix))
goto end;
if (GF_PYCHECK(x)) RETURN_OBJ(x);
if (!good_radix_p(radix, 1)) VALERR("radix out of range");
PyObject *z = 0;
mp *zz;
mptext_stringctx sc;
- char *kwlist[] = { "class", "x", "radix", 0 };
+ static const char *const kwlist[] = { "class", "x", "radix", 0 };
if (!PyArg_ParseTupleAndKeywords(arg, kw, "Os#|i:fromstring",
- kwlist, &me, &p, &len, &r))
+ KWLIST, &me, &p, &len, &r))
goto end;
if (!good_radix_p(r, 1)) VALERR("bad radix");
sc.buf = p; sc.lim = p + len;
{
gfreduce_pyobj *mr = 0;
gfreduce r;
- char *kwlist[] = { "m", 0 };
+ static const char *const kwlist[] = { "m", 0 };
mp *xx = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:new", kwlist, convgf, &xx))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:new", KWLIST, convgf, &xx))
goto end;
if (MP_ZEROP(xx)) ZDIVERR("modulus is zero!");
gfreduce_create(&r, xx);
{
mp *p = 0, *beta = 0;
gfn_pyobj *gg = 0;
- char *kwlist[] = { "p", "beta", 0 };
+ static const char *const kwlist[] = { "p", "beta", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&:new", KWLIST,
convgf, &p, convgf, &beta))
goto end;
gg = PyObject_New(gfn_pyobj, ty);
static PyObject *pixie_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
{
pixie_pyobj *rc = 0;
- char *kwlist[] = { "socket", 0 };
+ static const char *const kwlist[] = { "socket", 0 };
char *sock = 0;
int fd;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|s:new", kwlist, &sock))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|s:new", KWLIST, &sock))
goto end;
if ((fd = pixie_open(sock)) < 0)
OSERR(sock);
{
unsigned mode = PMODE_READ;
char *tag;
- char *kwlist[] = { "tag", "mode", 0 };
+ static const char *const kwlist[] = { "tag", "mode", 0 };
PyObject *rc = 0;
int r;
char buf[1024];
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s|O&:read", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s|O&:read", KWLIST,
&tag, convuint, &mode))
goto end;
r = pixie_read(PIXIE_FD(me), tag, mode, buf, sizeof(buf));
char *tag;
unsigned f = PMODE_READ;
PyObject *rc = 0;
- char *kwlist[] = { "tag", "mode", 0 };
+ static const char *const kwlist[] = { "tag", "mode", 0 };
char buf[1024];
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s|O&:ppread", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s|O&:ppread", KWLIST,
&tag, convuint, &f))
goto end;
if (passphrase_read(tag, f, buf, sizeof(buf)))
static PyObject *pfilt_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { "x", 0 };
+ static const char *const kwlist[] = { "x", 0 };
PyObject *xobj;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O:new", kwlist, &xobj))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O:new", KWLIST, &xobj))
return (0);
return (pfilt_pymake(ty, xobj));
}
{
mp *x = 0;
rabin_pyobj *o = 0;
- char *kwlist[] = { "x", 0 };
+ static const char *const kwlist[] = { "x", 0 };
- 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);
PyObject *rc = 0;
int st = PGEN_ABORT;
long l;
- 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" };
Py_INCREF(py);
rq++;
if (rq > N(meth)) SYSERR("event code out of range");
pyev = pgevent_pywrap(ev);
- if ((rc = PyObject_CallMethod(py, meth[rq], "(O)", pyev)) == 0)
+ if ((rc = PyObject_CallMethod(py, (/*unconst*/ char *)meth[rq],
+ "(O)", pyev)) == 0)
goto end;
if (rc == Py_None)
st = PGEN_TRY;
{
mpw s;
pgstep_pyobj *rc = 0;
- char *kwlist[] = { "step", 0 };
+ static const char *const kwlist[] = { "step", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:new", kwlist, convmpw, &s))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&:new", KWLIST, convmpw, &s))
goto end;
rc = (pgstep_pyobj *)ty->tp_alloc(ty, 0);
rc->f.step = s;
{
PyObject *o, *fobj;
pgjump_pyobj *rc = 0;
- char *kwlist[] = { "jump", 0 };
+ static const char *const kwlist[] = { "jump", 0 };
- 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);
static PyObject *pgtest_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
{
pgtest_pyobj *rc = 0;
- char *kwlist[] = { 0 };
+ static const char *const kwlist[] = { 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, ":new", kwlist)) goto end;
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, ":new", KWLIST)) goto end;
rc = (pgtest_pyobj *)ty->tp_alloc(ty, 0);
rc->pg.proc = pgen_test;
rc->pg.ctx = &rc->r;
rabin tc;
pgev 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.proc = pgen_filter; step.ctx = &fc;
test.proc = pgen_test; test.ctx = &tc;
- 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))
unsigned n = 0;
pgev evt = { 0 };
PyObject *rc = 0;
- 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))
unsigned n = 0;
pgev evt = { 0 };
PyObject *rc = 0;
- 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))
unsigned on = 0;
size_t i, nf = 0;
PyObject *rc = 0, *vec;
- char *kwlist[] = { "pbits", "qbits", "name", "event", "ievent",
- "rng", "nsteps", 0 };
+ static const char *const kwlist[] =
+ { "pbits", "qbits", "name", "event", "ievent", "rng", "nsteps", 0 };
mp *x = 0, **v = 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))
{
PyObject *G, *p, *rng = rand_pyobj, *hash = sha_pyobj;
PyObject *rc = 0;
- char *kwlist[] = { "G", "p", "hash", "rng", 0 };
+ static const char *const kwlist[] = { "G", "p", "hash", "rng", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!O!|O!O!:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!O!|O!O!:new", KWLIST,
group_pytype, &G,
ge_pytype, &p,
gchash_pytype, &hash,
Py_ssize_t n;
mp *k = 0;
PyObject *rc = 0;
- char *kwlist[] = { "msg", "k", 0 };
+ static const char *const kwlist[] = { "msg", "k", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#|O&:sign", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#|O&:sign", KWLIST,
&p, &n, convmp, &k))
goto end;
if (n != DSA_D(me)->h->hashsz)
{
PyObject *G, *p = 0, *u, *rng = rand_pyobj, *hash = sha_pyobj;
PyObject *rc = 0;
- char *kwlist[] = { "G", "u", "p", "hash", "rng", 0 };
+ static const char *const kwlist[] = { "G", "u", "p", "hash", "rng", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!O|O!O!O!:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!O|O!O!O!:new", KWLIST,
group_pytype, &G,
&u,
ge_pytype, &p,
{
PyObject *G, *p, *rng = rand_pyobj, *hash = has160_pyobj;
PyObject *rc = 0;
- char *kwlist[] = { "G", "p", "hash", "rng", 0 };
+ static const char *const kwlist[] = { "G", "p", "hash", "rng", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!O!|O!O!:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!O!|O!O!:new", KWLIST,
group_pytype, &G,
ge_pytype, &p,
gchash_pytype, &hash,
{
PyObject *G, *u, *p = 0, *rng = rand_pyobj, *hash = has160_pyobj;
PyObject *rc = 0;
- char *kwlist[] = { "G", "u", "p", "hash", "rng", 0 };
+ static const char *const kwlist[] = { "G", "u", "p", "hash", "rng", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!O|O!O!O!:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O!O|O!O!O!:new", KWLIST,
group_pytype, &G,
&u,
ge_pytype, &p,
Py_ssize_t n;
mp *k = 0;
PyObject *r = 0, *rc = 0;
- char *kwlist[] = { "msg", "k", 0 };
+ static const char *const kwlist[] = { "msg", "k", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#|O&:sign", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#|O&:sign", KWLIST,
&p, &n, convmp, &k))
goto end;
if (n != DSA_D(me)->h->hashsz)
{
rsa_pub rp = { 0 };
rsapub_pyobj *o;
- char *kwlist[] = { "n", "e", 0 };
+ static const char *const kwlist[] = { "n", "e", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&:new", KWLIST,
convmp, &rp.n, convmp, &rp.e))
goto end;
if (!MP_ODDP(rp.n)) VALERR("RSA modulus must be even");
{
rsa_priv rp = { 0 };
PyObject *rng = Py_None;
- char *kwlist[] =
+ static const char *const kwlist[] =
{ "n", "e", "d", "p", "q", "dp", "dq", "q_inv", "rng", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&O&O&O&O&O&O&O&O:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&O&O&O&O&O&O&O&O:new", KWLIST,
convmp, &rp.n, convmp, &rp.e,
convmp, &rp.d,
convmp, &rp.p, convmp, &rp.q,
PyObject *rng = RSA_RNG(me);
mp *x = 0;
PyObject *rc = 0;
- char *kwlist[] = { "x", "rng", 0 };
+ static const char *const kwlist[] = { "x", "rng", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|O:privop", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|O:privop", KWLIST,
convmp, &x, &rng))
goto end;
if (rng != Py_None && !GRAND_PYCHECK(rng))
rsa_priv rp;
mp *e = 0;
pgev evt = { 0 };
- char *kwlist[] = { "class", "nbits", "event", "rng", "nsteps", "e", 0 };
+ static const char *const kwlist[] =
+ { "class", "nbits", "event", "rng", "nsteps", "e", 0 };
PyObject *rc = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "OO&|O&O&O&O&:generate", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "OO&|O&O&O&O&:generate", KWLIST,
&me, convuint, &nbits, convpgev, &evt,
convgrand, &r, convuint, &n,
convmp, &e))
octet *b = 0;
size_t sz;
mp *x;
- char *kwlist[] = { "msg", "nbits", "ep", "rng", 0 };
+ static const char *const kwlist[] = { "msg", "nbits", "ep", "rng", 0 };
p1.r = &rand_global; ep = 0; epsz = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#O&|s#O&:encode", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#O&|s#O&:encode", KWLIST,
&m, &msz, convulong, &nbits,
&ep, &epsz, convgrand, &p1.r))
goto end;
octet *b = 0;
size_t sz;
mp *x = 0;
- char *kwlist[] = { "ct", "nbits", "ep", "rng", 0 };
+ static const char *const kwlist[] = { "ct", "nbits", "ep", "rng", 0 };
p1.r = &rand_global; ep = 0; epsz = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&|s#O&:decode", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&|s#O&:decode", KWLIST,
convmp, &x, convulong, &nbits,
&ep, &epsz, convgrand, &p1.r))
goto end;
octet *b = 0;
size_t sz;
mp *x;
- char *kwlist[] = { "msg", "nbits", "ep", "rng", 0 };
+ static const char *const kwlist[] = { "msg", "nbits", "ep", "rng", 0 };
p1.r = &rand_global; ep = 0; epsz = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#O&|s#O&:encode", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#O&|s#O&:encode", KWLIST,
&m, &msz, convulong, &nbits,
&ep, &epsz, convgrand, &p1.r))
goto end;
octet *b = 0;
size_t sz;
mp *x = 0;
- char *kwlist[] = { "msg", "sig", "nbits", "ep", "rng", 0 };
+ static const char *const kwlist[] =
+ { "msg", "sig", "nbits", "ep", "rng", 0 };
p1.r = &rand_global; ep = 0; epsz = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "OO&O&|s#O&:decode", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "OO&O&|s#O&:decode", KWLIST,
&hukairz, convmp, &x, convulong, &nbits,
&ep, &epsz, convgrand, &p1.r))
goto end;
octet *b = 0;
size_t sz;
mp *x;
- char *kwlist[] = { "msg", "nbits", "mgf", "hash", "ep", "rng", 0 };
+ static const char *const kwlist[] =
+ { "msg", "nbits", "mgf", "hash", "ep", "rng", 0 };
o.r = &rand_global; o.cc = &sha_mgf; o.ch = &sha; ep = 0; epsz = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#O&|O&O&s#O&:encode", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#O&|O&O&s#O&:encode", KWLIST,
&m, &msz, convulong, &nbits,
convgccipher, &o.cc,
convgchash, &o.ch,
octet *b = 0;
size_t sz;
mp *x = 0;
- char *kwlist[] = { "ct", "nbits", "mgf", "hash", "ep", "rng", 0 };
+ static const char *const kwlist[] =
+ { "ct", "nbits", "mgf", "hash", "ep", "rng", 0 };
o.r = &rand_global; o.cc = &sha_mgf; o.ch = &sha; ep = 0; epsz = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&|O&O&s#O&:decode", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&|O&O&s#O&:decode", KWLIST,
convmp, &x, convulong, &nbits,
convgccipher, &o.cc,
convgchash, &o.ch,
octet *b = 0;
size_t sz;
mp *x = 0;
- char *kwlist[] = { "msg", "nbits", "mgf", "hash", "saltsz", "rng", 0 };
+ static const char *const kwlist[] =
+ { "msg", "nbits", "mgf", "hash", "saltsz", "rng", 0 };
p.cc = &sha_mgf; p.ch = &sha; p.r = &rand_global; p.ssz = (size_t)-1;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#O&|O&O&O&O&:encode", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#O&|O&O&O&O&:encode", KWLIST,
&m, &msz, convulong, &nbits,
convgccipher, &p.cc,
convgchash, &p.ch,
size_t sz;
int n;
mp *x = 0;
- char *kwlist[] =
+ static const char *const kwlist[] =
{ "msg", "sig", "nbits", "mgf", "hash", "saltsz", "rng", 0 };
p.cc = &sha_mgf; p.ch = &sha; p.r = &rand_global; p.ssz = (size_t)-1;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#O&O&|O&O&O&O&:decode", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#O&O&|O&O&O&O&:decode", KWLIST,
&m, &msz, convmp, &x, convulong, &nbits,
convgccipher, &p.cc,
convgchash, &p.ch,
int ph = phdflt; \
PyObject *rc = 0; \
octet pp[ED##_PUBSZ]; \
- char *kwlist[] = { "key", "msg", "pub", "perso", "phflag", 0 }; \
+ static const char *const kwlist[] = \
+ { "key", "msg", "pub", "perso", "phflag", 0 }; \
if (!PyArg_ParseTupleAndKeywords(arg, kw, \
"s#s#|s#s#O&:" #ed "_sign", \
- kwlist, \
+ KWLIST, \
&k, &ksz, &m, &msz, &p, &psz, \
&c, &csz, convbool, &ph)) \
goto end; \
Py_ssize_t psz, csz = 0, msz, ssz; \
int ph = phdflt; \
PyObject *rc = 0; \
- char *kwlist[] = { "pub", "msg", "sig", "perso", "phflag", 0 }; \
+ static const char *const kwlist[] = \
+ { "pub", "msg", "sig", "perso", "phflag", 0 }; \
if (!PyArg_ParseTupleAndKeywords(arg, kw, \
"s#s#s#|s#O&:" #ed "_verify", \
- kwlist, \
+ KWLIST, \
&p, &psz, &m, &msz, &s, &ssz, \
&c, &csz, convbool, &ph)) \
goto end; \
{
size_t l;
mpw o = 0;
- char *kwlist[] = { "bits", "or", 0 };
+ static const char *const kwlist[] = { "bits", "or", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|O&:mp", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|O&:mp", KWLIST,
convszt, &l, convmpw, &o))
goto end;
if (grand_check(me)) return (0);
static PyObject *grmeth_seedrand(PyObject *me, PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { "rng", 0 };
+ static const char *const kwlist[] = { "rng", 0 };
grand *r = GRAND_R(me);
grand *rr = &rand_global;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:seedrand", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:seedrand", KWLIST,
convgrand, &rr) ||
grand_check(me) || checkop(r, GRAND_SEEDRAND, "seedrand"))
goto end;
static PyObject *lcrand_pynew(PyTypeObject *me, PyObject *arg, PyObject *kw)
{
uint32 n = 0;
- char *kwlist[] = { "seed", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:new", kwlist, convu32, &n))
+ static const char *const kwlist[] = { "seed", 0 };
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:new", KWLIST, convu32, &n))
return (0);
return (grand_dopywrap(lcrand_pytype, lcrand_create(n), f_freeme));
}
static PyObject *fibrand_pynew(PyTypeObject *me, PyObject *arg, PyObject *kw)
{
uint32 n = 0;
- char *kwlist[] = { "seed", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:new", kwlist, convu32, &n))
+ static const char *const kwlist[] = { "seed", 0 };
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:new", KWLIST, convu32, &n))
return (0);
return (grand_dopywrap(fibrand_pytype, fibrand_create(n), f_freeme));
}
static PyObject *truerand_pynew(PyTypeObject *ty,
PyObject *arg, PyObject *kw)
{
- char *kwlist[] = { 0 };
+ static const char *const kwlist[] = { 0 };
grand *r;
PyObject *rc = 0;
- if (PyArg_ParseTupleAndKeywords(arg, kw, ":new", kwlist)) goto end;
+ if (PyArg_ParseTupleAndKeywords(arg, kw, ":new", KWLIST)) goto end;
r = rand_create();
r->ops->misc(r, RAND_NOISESRC, &noise_source);
r->ops->misc(r, RAND_SEED, 160);
static PyObject *gcrand_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
{
const gccrand_info *info = GCCRAND_INFO(ty);
- static char *kwlist[] = { "key", 0 };
+ static const char *const kwlist[] = { "key", 0 };
char *k;
Py_ssize_t n;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#:new", kwlist, &k, &n))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#:new", KWLIST, &k, &n))
goto end;
if (keysz(n, info->keysz) != n) VALERR("bad key length");
return (grand_dopywrap(ty, info->func(k, n), f_freeme));
{
const gccrand_info *info = GCCRAND_INFO(ty);
uint32 i = 0;
- static char *kwlist[] = { "key", "i", 0 };
+ static const char *const kwlist[] = { "key", "i", 0 };
char *k;
Py_ssize_t n;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#O&:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#O&:new", KWLIST,
&k, &n, convu32, &i))
goto end;
if (keysz(n, info->keysz) != n) VALERR("bad key length");
static PyObject *gcnrand_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
{
const gccrand_info *info = GCCRAND_INFO(ty);
- static char *kwlist[] = { "key", "nonce", 0 };
+ static const char *const kwlist[] = { "key", "nonce", 0 };
char *k, *n;
Py_ssize_t ksz, nsz;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#s#:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#s#:new", KWLIST,
&k, &ksz, &n, &nsz))
goto end;
if (keysz(ksz, info->keysz) != ksz) VALERR("bad key length");
PyObject *arg, PyObject *kw)
{
const gccrand_info *info = GCCRAND_INFO(ty);
- static char *kwlist_shake[] = { "key", "func", "perso", 0 };
- static char *kwlist_func[] = { "key", "perso", 0 };
+ static const char
+ *const kwlist_shake[] = { "key", "func", "perso", 0 },
+ *const kwlist_func[] = { "key", "perso", 0 };
char *k, *f = 0, *p = 0;
Py_ssize_t ksz, fsz = 0, psz = 0;
if ((info->f&RNGF_MASK) == RNG_SHAKE
- ? !PyArg_ParseTupleAndKeywords(arg, kw, "s#|s#s#:new", kwlist_shake,
+ ? !PyArg_ParseTupleAndKeywords(arg, kw, "s#|s#s#:new",
+ (/*unconst*/ char **)kwlist_shake,
&k, &ksz, &f, &fsz, &p, &psz)
- : !PyArg_ParseTupleAndKeywords(arg, kw, "s#|s#:new", kwlist_func,
+ : !PyArg_ParseTupleAndKeywords(arg, kw, "s#|s#:new",
+ (/*unconst*/ char **)kwlist_func,
&k, &ksz, &p, &psz))
goto end;
if (keysz(ksz, info->keysz) != ksz) VALERR("bad key length");
int ksz, ssz;
const gchash *hco = &md5, *hci = &sha;
PyObject *rc = 0;
- char *kwlist[] = { "key", "seed", "ohash", "ihash", 0 };
+ static const char *const kwlist[] = { "key", "seed", "ohash", "ihash", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#s#|O&O&:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#s#|O&O&:new", KWLIST,
&k, &ksz, &s, &ssz,
convgchash, &hco, convgchash, &hci))
goto end;
int ksz, ssz;
const gcmac *mc = &sha_hmac;
PyObject *rc = 0;
- char *kwlist[] = { "key", "seed", "mac", 0 };
+ static const char *const kwlist[] = { "key", "seed", "mac", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#s#|O&:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#s#|O&:new", KWLIST,
&k, &ksz, &s, &ssz,
convgcmac, &mc))
goto end;
int ksz, ssz;
const gcmac *mcl = &md5_hmac, *mcr = &sha_hmac;
PyObject *rc = 0;
- char *kwlist[] = { "key", "seed", "lmac", "rmac", 0 };
+ static const char *const kwlist[] = { "key", "seed", "lmac", "rmac", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#s#|O&O&:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#s#|O&O&:new", KWLIST,
&k, &ksz, &s, &ssz,
convgcmac, &mcl, convgcmac, &mcr))
goto end;
char *p;
int sz;
PyObject *rc = 0;
- char *kwlist[] = { "seed", 0 };
+ static const char *const kwlist[] = { "seed", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#:new", kwlist, &p, &sz))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "s#:new", KWLIST, &p, &sz))
goto end;
rc = grand_dopywrap(ty, dsarand_create(p, sz), f_freeme);
end:
{
mp *n = 0, *x = MP_TWO;
PyObject *rc = 0;
- char *kwlist[] = { "n", "x", 0 };
+ static const char *const kwlist[] = { "n", "x", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|O&:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&|O&:new", KWLIST,
convmp, &n, convmp, &x))
goto end;
rc = grand_dopywrap(ty, bbs_rand(n, x), f_freeme);
{
mp *p = 0, *q = 0, *n = 0, *x = MP_TWO;
bbspriv_pyobj *rc = 0;
- char *kwlist[] = { "n", "p", "q", "seed", 0 };
+ static const char *const kwlist[] = { "n", "p", "q", "seed", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&O&O&O&:new", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&O&O&O&:new", KWLIST,
convmp, &n, convmp, &p, convmp, &q,
convmp, &x))
goto end;
pgev evt = { 0 };
unsigned nbits, n = 0;
grand *r = &rand_global;
- char *kwlist[] = { "class", "nbits", "event", "rng", "nsteps", "seed", 0 };
+ static const char *const kwlist[] =
+ { "class", "nbits", "event", "rng", "nsteps", "seed", 0 };
bbspriv_pyobj *rc = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "OO&|O&O&O&O&:generate", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "OO&|O&O&O&O&:generate", KWLIST,
&me, convuint, &nbits, convpgev, &evt,
convgrand, &r, convuint, &n, convmp, &x))
goto end;
unsigned t;
grand *r = &rand_global;
gfshare_pyobj *s;
- char *kwlist[] = { "threshold", "secret", "rng", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&s#|O&:new", kwlist,
+ static const char *const kwlist[] = { "threshold", "secret", "rng", 0 };
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&s#|O&:new", KWLIST,
convuint, &t, &p, &n, convgrand, &r))
goto end;
if (!t || t > 255) VALERR("threshold must be nonzero and < 256");
{
unsigned t, sz;
gfshare_pyobj *s;
- char *kwlist[] = { "threshold", "size", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&:new", kwlist,
+ static const char *const kwlist[] = { "threshold", "size", 0 };
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&:new", KWLIST,
convuint, &t, convuint, &sz))
goto end;
if (!t || t > 255) VALERR("threshold must be nonzero and < 256");
grand *r = &rand_global;
mp *m = 0;
share_pyobj *s;
- char *kwlist[] = { "threshold", "secret", "modulus", "rng", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&|O&O&:new", kwlist,
+ static const char *const kwlist[] =
+ { "threshold", "secret", "modulus", "rng", 0 };
+
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&|O&O&:new", KWLIST,
convuint, &t, convmp, &sec,
convmp, &m, convgrand, &r))
goto end;
unsigned t;
mp *m = 0;
share_pyobj *s;
- char *kwlist[] = { "threshold", "modulus", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&:new", kwlist,
+ static const char *const kwlist[] = { "threshold", "modulus", 0 };
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "O&O&:new", KWLIST,
convuint, &t, convmp, &m))
goto end;
if (!t) VALERR("threshold must be nonzero");
return (rc);
}
-static char *def_kwlist[] = { "key", "default", 0 };
+static const char *const def_kwlist[] = { "key", "default", 0 };
PyObject *gmapmeth_get(PyObject *me, PyObject *arg, PyObject *kw)
{
PyObject *k, *def = Py_None, *v;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "OO:get", def_kwlist, &k, &def))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "OO:get",
+ (/*unconst*/ char **)def_kwlist,
+ &k, &def))
return (0);
if ((v = PyObject_GetItem(me, k)) != 0) return (v);
PyErr_Clear();
PyObject *k, *def = Py_None, *v;
if (!PyArg_ParseTupleAndKeywords(arg, kw, "OO:setdefault",
- def_kwlist, &k, &def))
+ (/*unconst*/ char **)def_kwlist,
+ &k, &def))
return (0);
if ((v = PyObject_GetItem(me, k)) != 0) return (v);
PyErr_Clear();
{
PyObject *k, *def = 0, *v;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "OO:pop", def_kwlist, &k, &def))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "OO:pop",
+ (/*unconst*/ char **)def_kwlist,
+ &k, &def))
return (0);
if ((v = PyObject_GetItem(me, k)) != 0) {
PyObject_DelItem(me, k);