comparison mercurial/parsers.c @ 24032:c53bc2e52514

parsers: use k instead of n for PyArg_ParseTuple because python 2.4 is awful
author Augie Fackler <augie@google.com>
date Wed, 04 Feb 2015 11:38:30 -0500
parents 26fbf07482b2
children a5f1bccd2996
comparison
equal deleted inserted replaced
24031:fe1abb5d92f6 24032:c53bc2e52514
2260 } 2260 }
2261 2261
2262 2262
2263 static PyObject *fm1readmarkers(PyObject *self, PyObject *args) { 2263 static PyObject *fm1readmarkers(PyObject *self, PyObject *args) {
2264 const char *data; 2264 const char *data;
2265 Py_ssize_t datalen, offset, stop; 2265 Py_ssize_t datalen;
2266 /* only unsigned long because python 2.4, should be Py_ssize_t */
2267 unsigned long offset, stop;
2266 PyObject *markers = NULL; 2268 PyObject *markers = NULL;
2267 2269
2268 if (!PyArg_ParseTuple(args, "s#nn", &data, &datalen, &offset, &stop)) { 2270 /* replace kk with nn when we drop Python 2.4 */
2271 if (!PyArg_ParseTuple(args, "s#kk", &data, &datalen, &offset, &stop)) {
2269 return NULL; 2272 return NULL;
2270 } 2273 }
2271 data += offset; 2274 data += offset;
2272 markers = PyList_New(0); 2275 markers = PyList_New(0);
2273 if (!markers) { 2276 if (!markers) {