equal
deleted
inserted
replaced
68 Py_ssize_t len = 0, la, lb, li = 0, lcommon = 0, lmax; |
68 Py_ssize_t len = 0, la, lb, li = 0, lcommon = 0, lmax; |
69 PyThreadState *_save; |
69 PyThreadState *_save; |
70 |
70 |
71 l.next = NULL; |
71 l.next = NULL; |
72 |
72 |
73 if (!PyArg_ParseTuple(args, "s#s#:bdiff", &sa, &la, &sb, &lb)) |
73 if (!PyArg_ParseTuple(args, PY23("s#s#:bdiff", "y#y#:bdiff"), &sa, &la, |
|
74 &sb, &lb)) |
74 return NULL; |
75 return NULL; |
75 |
76 |
76 if (la > UINT_MAX || lb > UINT_MAX) { |
77 if (la > UINT_MAX || lb > UINT_MAX) { |
77 PyErr_SetString(PyExc_ValueError, "bdiff inputs too large"); |
78 PyErr_SetString(PyExc_ValueError, "bdiff inputs too large"); |
78 return NULL; |
79 return NULL; |
194 { |
195 { |
195 const char *text; |
196 const char *text; |
196 Py_ssize_t nelts = 0, size, i, start = 0; |
197 Py_ssize_t nelts = 0, size, i, start = 0; |
197 PyObject *result = NULL; |
198 PyObject *result = NULL; |
198 |
199 |
199 if (!PyArg_ParseTuple(args, "s#", &text, &size)) { |
200 if (!PyArg_ParseTuple(args, PY23("s#", "y#"), &text, &size)) { |
200 goto abort; |
201 goto abort; |
201 } |
202 } |
202 if (!size) { |
203 if (!size) { |
203 return PyList_New(0); |
204 return PyList_New(0); |
204 } |
205 } |