From 803022d93fb8c8a061e01994a889a30ce3e8aff5 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Wed, 13 Feb 2013 18:40:39 -0800 Subject: [PATCH] Use Py_ssize_t instead of long --- _imagingmath.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_imagingmath.c b/_imagingmath.c index c21dac1de..4f377e9ac 100644 --- a/_imagingmath.c +++ b/_imagingmath.c @@ -174,8 +174,8 @@ _unop(PyObject* self, PyObject* args) Imaging im1; void (*unop)(Imaging, Imaging); - long op, i0, i1; - if (!PyArg_ParseTuple(args, "lll", &op, &i0, &i1)) + Py_ssize_t op, i0, i1; + if (!PyArg_ParseTuple(args, "nnn", &op, &i0, &i1)) return NULL; out = (Imaging) i0; @@ -197,8 +197,8 @@ _binop(PyObject* self, PyObject* args) Imaging im2; void (*binop)(Imaging, Imaging, Imaging); - long op, i0, i1, i2; - if (!PyArg_ParseTuple(args, "llll", &op, &i0, &i1, &i2)) + Py_ssize_t op, i0, i1, i2; + if (!PyArg_ParseTuple(args, "nnnn", &op, &i0, &i1, &i2)) return NULL; out = (Imaging) i0;