# HG changeset patch # User Augie Fackler # Date 2015-02-04 16:38:30 # Node ID c53bc2e52514825cbd40d29dd08693c8a640256e # Parent fe1abb5d92f66c70595bbcf6446b01208617f165 parsers: use k instead of n for PyArg_ParseTuple because python 2.4 is awful diff --git a/mercurial/parsers.c b/mercurial/parsers.c --- a/mercurial/parsers.c +++ b/mercurial/parsers.c @@ -2262,10 +2262,13 @@ bail: static PyObject *fm1readmarkers(PyObject *self, PyObject *args) { const char *data; - Py_ssize_t datalen, offset, stop; + Py_ssize_t datalen; + /* only unsigned long because python 2.4, should be Py_ssize_t */ + unsigned long offset, stop; PyObject *markers = NULL; - if (!PyArg_ParseTuple(args, "s#nn", &data, &datalen, &offset, &stop)) { + /* replace kk with nn when we drop Python 2.4 */ + if (!PyArg_ParseTuple(args, "s#kk", &data, &datalen, &offset, &stop)) { return NULL; } data += offset;