# HG changeset patch # User Adrian Buehlmann # Date 1337815812 -7200 # Node ID 1b9d54c00d501b5cae4660b8d9c35e66c0bce4db # Parent 1ba3e17186c85c595b961eee57af5768c9bf0df8 base85: use Py_ssize_t for string lengths diff -r 1ba3e17186c8 -r 1b9d54c00d50 mercurial/base85.c --- a/mercurial/base85.c Tue May 22 15:17:37 2012 -0700 +++ b/mercurial/base85.c Thu May 24 01:30:12 2012 +0200 @@ -9,6 +9,7 @@ Largely based on git's implementation */ +#define PY_SSIZE_T_CLEAN #include #include "util.h" @@ -33,7 +34,7 @@ const unsigned char *text; PyObject *out; char *dst; - int len, olen, i; + Py_ssize_t len, olen, i; unsigned int acc, val, ch; int pad = 0; @@ -81,7 +82,8 @@ PyObject *out; const char *text; char *dst; - int len, i, j, olen, c, cap; + Py_ssize_t len, i, j, olen, cap; + int c; unsigned int acc; if (!PyArg_ParseTuple(args, "s#", &text, &len))