# HG changeset patch # User Adrian Buehlmann # Date 2012-05-19 23:28:31 # Node ID 9a8ab5c47f844ef65bf78e9da9b7db93fe5b3399 # Parent 923bd97b86a029a9e3ec32f374788eeb674e3dce mpatch: use Py_ssize_t for string length diff --git a/mercurial/mpatch.c b/mercurial/mpatch.c --- a/mercurial/mpatch.c +++ b/mercurial/mpatch.c @@ -20,6 +20,7 @@ of the GNU General Public License, incorporated herein by reference. */ +#define PY_SSIZE_T_CLEAN #include #include #include @@ -355,7 +356,7 @@ static PyObject * patchedsize(PyObject *self, PyObject *args) { long orig, start, end, len, outlen = 0, last = 0; - int patchlen; + Py_ssize_t patchlen; char *bin, *binend, *data; if (!PyArg_ParseTuple(args, "ls#", &orig, &bin, &patchlen))