Show More
@@ -147,7 +147,7 b' static int equatelines(struct line *a, i' | |||
|
147 | 147 | break; |
|
148 | 148 | |
|
149 | 149 | a[i].e = j; /* use equivalence class for quick compare */ |
|
150 | if(h[j].len <= t) | |
|
150 | if (h[j].len <= t) | |
|
151 | 151 | a[i].n = h[j].pos; /* point to head of match list */ |
|
152 | 152 | else |
|
153 | 153 | a[i].n = -1; /* too popular */ |
@@ -270,7 +270,7 b' static PyObject *blocks(PyObject *self, ' | |||
|
270 | 270 | if (!l.head || !rl) |
|
271 | 271 | goto nomem; |
|
272 | 272 | |
|
273 | for(h = l.base; h != l.head; h++) { | |
|
273 | for (h = l.base; h != l.head; h++) { | |
|
274 | 274 | m = Py_BuildValue("iiii", h->a1, h->a2, h->b1, h->b2); |
|
275 | 275 | PyList_SetItem(rl, pos, m); |
|
276 | 276 | pos++; |
@@ -305,7 +305,7 b' static PyObject *bdiff(PyObject *self, P' | |||
|
305 | 305 | goto nomem; |
|
306 | 306 | |
|
307 | 307 | /* calculate length of output */ |
|
308 | for(h = l.base; h != l.head; h++) { | |
|
308 | for (h = l.base; h != l.head; h++) { | |
|
309 | 309 | if (h->a1 != la || h->b1 != lb) |
|
310 | 310 | len += 12 + bl[h->b1].l - bl[lb].l; |
|
311 | 311 | la = h->a2; |
@@ -320,7 +320,7 b' static PyObject *bdiff(PyObject *self, P' | |||
|
320 | 320 | rb = PyString_AsString(result); |
|
321 | 321 | la = lb = 0; |
|
322 | 322 | |
|
323 | for(h = l.base; h != l.head; h++) { | |
|
323 | for (h = l.base; h != l.head; h++) { | |
|
324 | 324 | if (h->a1 != la || h->b1 != lb) { |
|
325 | 325 | len = bl[h->b1].l - bl[lb].l; |
|
326 | 326 | *(uint32_t *)(encode) = htonl(al[la].l - al->l); |
@@ -353,3 +353,4 b' PyMODINIT_FUNC initbdiff(void)' | |||
|
353 | 353 | { |
|
354 | 354 | Py_InitModule3("bdiff", methods, mdiff_doc); |
|
355 | 355 | } |
|
356 |
General Comments 0
You need to be logged in to leave comments.
Login now