Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/mpatch.c @ 5458:cd1a6e7216c5
mpatch: use int rather than ssize_t
We might need to be more clever than this to make Py2.5 happy.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 11 Oct 2007 17:47:04 -0500 |
parents | a0952e4e52eb |
children | fe9b0bb3eb1c |
comparison
equal
deleted
inserted
replaced
5457:7372b6bbc5e6 | 5458:cd1a6e7216c5 |
---|---|
309 } | 309 } |
310 | 310 |
311 /* recursively generate a patch of all bins between start and end */ | 311 /* recursively generate a patch of all bins between start and end */ |
312 static struct flist *fold(PyObject *bins, int start, int end) | 312 static struct flist *fold(PyObject *bins, int start, int end) |
313 { | 313 { |
314 int len; | 314 int len, blen; |
315 ssize_t blen; | |
316 const char *buffer; | 315 const char *buffer; |
317 | 316 |
318 if (start + 1 == end) { | 317 if (start + 1 == end) { |
319 /* trivial case, output a decoded list */ | 318 /* trivial case, output a decoded list */ |
320 PyObject *tmp = PyList_GetItem(bins, start); | 319 PyObject *tmp = PyList_GetItem(bins, start); |
336 { | 335 { |
337 PyObject *text, *bins, *result; | 336 PyObject *text, *bins, *result; |
338 struct flist *patch; | 337 struct flist *patch; |
339 const char *in; | 338 const char *in; |
340 char *out; | 339 char *out; |
341 int len, outlen; | 340 int len, inlen, outlen; |
342 ssize_t inlen; | |
343 | 341 |
344 if (!PyArg_ParseTuple(args, "OO:mpatch", &text, &bins)) | 342 if (!PyArg_ParseTuple(args, "OO:mpatch", &text, &bins)) |
345 return NULL; | 343 return NULL; |
346 | 344 |
347 len = PyList_Size(bins); | 345 len = PyList_Size(bins); |