Mercurial > hg
changeset 16758:9a8ab5c47f84
mpatch: use Py_ssize_t for string length
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Sun, 20 May 2012 01:28:31 +0200 |
parents | 923bd97b86a0 |
children | 07741a5d6608 |
files | mercurial/mpatch.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/mpatch.c Sun May 20 00:08:18 2012 +0200 +++ b/mercurial/mpatch.c Sun May 20 01:28:31 2012 +0200 @@ -20,6 +20,7 @@ of the GNU General Public License, incorporated herein by reference. */ +#define PY_SSIZE_T_CLEAN #include <Python.h> #include <stdlib.h> #include <string.h> @@ -355,7 +356,7 @@ 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))