mercurial/parsers.c
changeset 16629 1435866c1937
parent 16621 8c3c9031f5aa
child 16642 5cf18921bb7b
equal deleted inserted replaced
16628:3c738cb162bf 16629:1435866c1937
   506 
   506 
   507 	if (obj == NULL)
   507 	if (obj == NULL)
   508 		return NULL;
   508 		return NULL;
   509 
   509 
   510 #define istat(__n, __d) \
   510 #define istat(__n, __d) \
   511 	if (PyDict_SetItemString(obj, __d, PyInt_FromLong(self->__n)) == -1) \
   511 	if (PyDict_SetItemString(obj, __d, PyInt_FromSsize_t(self->__n)) == -1) \
   512 		goto bail;
   512 		goto bail;
   513 
   513 
   514 	if (self->added) {
   514 	if (self->added) {
   515 		Py_ssize_t len = PyList_GET_SIZE(self->added);
   515 		Py_ssize_t len = PyList_GET_SIZE(self->added);
   516 		if (PyDict_SetItemString(obj, "index entries added",
   516 		if (PyDict_SetItemString(obj, "index entries added",
   517 					 PyInt_FromLong(len)) == -1)
   517 					 PyInt_FromSsize_t(len)) == -1)
   518 			goto bail;
   518 			goto bail;
   519 	}
   519 	}
   520 
   520 
   521 	if (self->raw_length != self->length - 1)
   521 	if (self->raw_length != self->length - 1)
   522 		istat(raw_length, "revs on disk");
   522 		istat(raw_length, "revs on disk");