X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/blobdiff_plain/57aaeb41328e1ad061e971a6d4571a71cb800fae..27cbcf9d360a7b25e54c4e268db5889246015440:/catacomb.c diff --git a/catacomb.c b/catacomb.c index 478a20a..01311bf 100644 --- a/catacomb.c +++ b/catacomb.c @@ -129,6 +129,19 @@ end: return (z); } +int convmpw(PyObject *o, void *pp) +{ + unsigned long u; + unsigned *p = pp; + + if (!convulong(o, &u)) goto end; + if (u > MPW_MAX) VALERR("out of range"); + *p = u; + return (1); +end: + return (0); +} + static PyObject *smallprimes(void) { PyObject *v = PyList_New(NPRIME);