Further fixing to use `Py_ssize_t' in place of int.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 11 Sep 2016 23:14:16 +0000 (00:14 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 11 Sep 2016 23:14:16 +0000 (00:14 +0100)
This addresses the remaining compiler warnings when building for 64-bit
targets.

catacomb-python.h
util.c

index b287450..a379e1d 100644 (file)
@@ -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 (file)
--- 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;