~mdw
/
catacomb-python
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
algorithms.c, ec.c, field.c: Replace properties by member access.
[catacomb-python]
/
catacomb.c
diff --git
a/catacomb.c
b/catacomb.c
index
750b429
..
01311bf
100644
(file)
--- a/
catacomb.c
+++ b/
catacomb.c
@@
-129,6
+129,19
@@
end:
return (z);
}
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);
static PyObject *smallprimes(void)
{
PyObject *v = PyList_New(NPRIME);
@@
-158,7
+171,7
@@
static PyMethodDef methods[] = {
static void init_random(void)
{
static void init_random(void)
{
-#if PY_
MAJOR_VERSION >= 3 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 6)
+#if PY_
VERSION_HEX >= 0x02060000
char *seed;
uint32 r;
char *seed;
uint32 r;