Show More
@@ -300,18 +300,19 b' nomem:' | |||
|
300 | 300 | |
|
301 | 301 | static PyObject *bdiff(PyObject *self, PyObject *args) |
|
302 | 302 | { |
|
303 | PyObject *sa, *sb, *result = NULL; | |
|
303 | char *sa, *sb; | |
|
304 | PyObject *result = NULL; | |
|
304 | 305 | struct line *al, *bl; |
|
305 | 306 | struct hunklist l = {NULL, NULL}; |
|
306 | 307 | struct hunk *h; |
|
307 | 308 | char encode[12], *rb; |
|
308 |
int an, bn, len = 0, la |
|
|
309 | int an, bn, len = 0, la, lb; | |
|
309 | 310 | |
|
310 |
if (!PyArg_ParseTuple(args, " |
|
|
311 | if (!PyArg_ParseTuple(args, "t#t#:bdiff", &sa, &la, &sb, &lb)) | |
|
311 | 312 | return NULL; |
|
312 | 313 | |
|
313 |
an = splitlines( |
|
|
314 |
bn = splitlines( |
|
|
314 | an = splitlines(sa, la, &al); | |
|
315 | bn = splitlines(sb, lb, &bl); | |
|
315 | 316 | if (!al || !bl) |
|
316 | 317 | goto nomem; |
|
317 | 318 | |
@@ -320,6 +321,7 b' static PyObject *bdiff(PyObject *self, P' | |||
|
320 | 321 | goto nomem; |
|
321 | 322 | |
|
322 | 323 | /* calculate length of output */ |
|
324 | la = lb = 0; | |
|
323 | 325 | for (h = l.base; h != l.head; h++) { |
|
324 | 326 | if (h->a1 != la || h->b1 != lb) |
|
325 | 327 | len += 12 + bl[h->b1].l - bl[lb].l; |
General Comments 0
You need to be logged in to leave comments.
Login now