equal
deleted
inserted
replaced
379 la = lb = 0; |
379 la = lb = 0; |
380 |
380 |
381 for (h = l.next; h; h = h->next) { |
381 for (h = l.next; h; h = h->next) { |
382 if (h->a1 != la || h->b1 != lb) { |
382 if (h->a1 != la || h->b1 != lb) { |
383 len = bl[h->b1].l - bl[lb].l; |
383 len = bl[h->b1].l - bl[lb].l; |
384 putbe32(al[la].l - al->l, rb); |
384 |
385 putbe32(al[h->a1].l - al->l, rb + 4); |
385 #define checkputbe32(__x, __c) \ |
386 putbe32(len, rb + 8); |
386 if (__x > UINT_MAX) { \ |
|
387 PyErr_SetString(PyExc_ValueError, \ |
|
388 "bdiff: value too large for putbe32"); \ |
|
389 goto nomem; \ |
|
390 } \ |
|
391 putbe32((uint32_t)(__x), __c); |
|
392 |
|
393 checkputbe32(al[la].l - al->l, rb); |
|
394 checkputbe32(al[h->a1].l - al->l, rb + 4); |
|
395 checkputbe32(len, rb + 8); |
387 memcpy(rb + 12, bl[lb].l, len); |
396 memcpy(rb + 12, bl[lb].l, len); |
388 rb += 12 + len; |
397 rb += 12 + len; |
389 } |
398 } |
390 la = h->a2; |
399 la = h->a2; |
391 lb = h->b2; |
400 lb = h->b2; |