From: Mark Wooding Date: Sun, 11 Sep 2016 23:14:16 +0000 (+0100) Subject: Further fixing to use `Py_ssize_t' in place of int. X-Git-Url: https://git.distorted.org.uk/~mdw/pyke/commitdiff_plain/9d73ed804c47372b96a4e8ad6964dcaa86f134fb Further fixing to use `Py_ssize_t' in place of int. This addresses the remaining compiler warnings when building for 64-bit targets. --- diff --git a/catacomb-python.h b/catacomb-python.h index b287450..a379e1d 100644 --- a/catacomb-python.h +++ b/catacomb-python.h @@ -282,7 +282,7 @@ extern PyMethodDef *donemethods(void); GMAP_DOMETHODS(GMAP_METHDECL, GMAP_KWMETHDECL) #define GMAP_ROMETHODS GMAP_DOROMETHODS(GMAP_METH, GMAP_KWMETH) #define GMAP_METHODS GMAP_DOMETHODS(GMAP_METH, GMAP_KWMETH) -extern int gmap_pysize(PyObject *); +extern Py_ssize_t gmap_pysize(PyObject *); extern PySequenceMethods gmap_pysequence; extern PyMethodDef gmap_pymethods[]; diff --git a/util.c b/util.c index 8a0c06c..ed56e99 100644 --- a/util.c +++ b/util.c @@ -413,7 +413,7 @@ PySequenceMethods gmap_pysequence = { 0 /* @sq_inplace_repeat@ */ }; -int gmap_pysize(PyObject *me) +Py_ssize_t gmap_pysize(PyObject *me) { PyObject *i = 0, *x = 0; int rc = -1;