mercurial/diffhelpers.c
branchstable
changeset 16651 9e40bc4c1bde
parent 13302 a4e0908ce35b
child 16693 f1aa3010642f
equal deleted inserted replaced
16650:fcb97d9a26cd 16651:9e40bc4c1bde
   133 
   133 
   134 	if (!PyArg_ParseTuple(args, "OOl", &a, &b, &bstart))
   134 	if (!PyArg_ParseTuple(args, "OOl", &a, &b, &bstart))
   135 		return NULL;
   135 		return NULL;
   136 	alen = PyList_Size(a);
   136 	alen = PyList_Size(a);
   137 	blen = PyList_Size(b);
   137 	blen = PyList_Size(b);
   138 	if (alen > blen - bstart) {
   138 	if (alen > blen - bstart || bstart < 0) {
   139 		return Py_BuildValue("l", -1);
   139 		return Py_BuildValue("l", -1);
   140 	}
   140 	}
   141 	for (i = 0; i < alen; i++) {
   141 	for (i = 0; i < alen; i++) {
   142 		sa = PyBytes_AsString(PyList_GET_ITEM(a, i));
   142 		sa = PyBytes_AsString(PyList_GET_ITEM(a, i));
   143 		sb = PyBytes_AsString(PyList_GET_ITEM(b, i + bstart));
   143 		sb = PyBytes_AsString(PyList_GET_ITEM(b, i + bstart));