X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/blobdiff_plain/9e947555194b0e435f39e6882e36e5b3639e3203..d96c882ed6f1852a266fd1a2b61bbc906cc805bb:/catacomb.c?ds=sidebyside diff --git a/catacomb.c b/catacomb.c index e868f0f..bb0bbdb 100644 --- a/catacomb.c +++ b/catacomb.c @@ -74,8 +74,8 @@ PyObject *mexp_common(PyObject *me, PyObject *arg, PyObject *qq, *x, *y, *z = 0; char *v = 0, *vv; - if (PyTuple_Size(arg) == 1) - arg = PyTuple_GetItem(arg, 0); + if (PyTuple_GET_SIZE(arg) == 1) + arg = PyTuple_GET_ITEM(arg, 0); Py_INCREF(arg); if (!PySequence_Check(arg)) TYERR("not a sequence"); n = PySequence_Size(arg); if (n < 0) goto end; @@ -135,7 +135,7 @@ static PyObject *smallprimes(void) int i; for (i = 0; i < NPRIME; i++) - PyList_SetItem(v, i, PyInt_FromLong(primetab[i])); + PyList_SET_ITEM(v, i, PyInt_FromLong(primetab[i])); return (v); } @@ -151,7 +151,7 @@ static PyObject *meth__ego(PyObject *me, PyObject *arg) static PyMethodDef methods[] = { #define METHNAME(func) meth_##func - METH (_ego, "_ego(ARGV0)") + METH (_ego, "_ego(ARGV0)") #undef METHNAME { 0 } };