equal
deleted
inserted
replaced
20 { |
20 { |
21 int hunksz = PyList_Size(hunk); |
21 int hunksz = PyList_Size(hunk); |
22 PyObject *s = PyList_GET_ITEM(hunk, hunksz-1); |
22 PyObject *s = PyList_GET_ITEM(hunk, hunksz-1); |
23 char *l = PyString_AS_STRING(s); |
23 char *l = PyString_AS_STRING(s); |
24 int sz = PyString_GET_SIZE(s); |
24 int sz = PyString_GET_SIZE(s); |
|
25 if (sz > 1 && l[sz-2] == '\r') |
|
26 /* tolerate CRLF in last line */ |
|
27 sz -= 1; |
25 int alen = PyList_Size(a); |
28 int alen = PyList_Size(a); |
26 int blen = PyList_Size(b); |
29 int blen = PyList_Size(b); |
27 char c = l[0]; |
30 char c = l[0]; |
28 |
31 |
29 PyObject *hline = PyString_FromStringAndSize(l, sz-1); |
32 PyObject *hline = PyString_FromStringAndSize(l, sz-1); |