diff -r 888bc106de83 -r 9ba8a93e55f5 mercurial/parsers.c --- a/mercurial/parsers.c Thu Sep 11 12:05:23 2014 -0500 +++ b/mercurial/parsers.c Mon Sep 08 20:20:17 2014 +0200 @@ -524,7 +524,7 @@ static PyObject *nullentry; static const char nullid[20]; -static long inline_scan(indexObject *self, const char **offsets); +static Py_ssize_t inline_scan(indexObject *self, const char **offsets); #if LONG_MAX == 0x7fffffffL static char *tuple_format = "Kiiiiiis#"; @@ -1853,7 +1853,7 @@ * Find all RevlogNG entries in an index that has inline data. Update * the optional "offsets" table with those entries. */ -static long inline_scan(indexObject *self, const char **offsets) +static Py_ssize_t inline_scan(indexObject *self, const char **offsets) { const char *data = PyString_AS_STRING(self->data); Py_ssize_t pos = 0; @@ -1913,7 +1913,7 @@ Py_INCREF(self->data); if (self->inlined) { - long len = inline_scan(self, NULL); + Py_ssize_t len = inline_scan(self, NULL); if (len == -1) goto bail; self->raw_length = len;