From 92d8797b11ec4b7c5e9b1b2e2721d2e2ec26cee8 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sun, 24 Nov 2019 12:35:45 +0000 Subject: [PATCH] *.c: Use Python macros rather than functions where possible. --- catacomb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/catacomb.c b/catacomb.c index e868f0f..f02d39e 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); } -- 2.11.0