comparison mercurial/cext/revlog.c @ 49212:d3d3495a5749

revlog: use appropriate format char for int ("i" instead of "I") From https://docs.python.org/3.8/c-api/arg.html#numbers : i (int) [int] Convert a Python integer to a plain C int. I (int) [unsigned int] Convert a Python integer to a C unsigned int, without overflow checking.
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 24 May 2022 19:09:24 +0400
parents 675594a0a71a
children 5846bc8a2855
comparison
equal deleted inserted replaced
49211:675594a0a71a 49212:d3d3495a5749
489 */ 489 */
490 static PyObject *index_pack_header(indexObject *self, PyObject *args) 490 static PyObject *index_pack_header(indexObject *self, PyObject *args)
491 { 491 {
492 int header; 492 int header;
493 char out[4]; 493 char out[4];
494 if (!PyArg_ParseTuple(args, "I", &header)) { 494 if (!PyArg_ParseTuple(args, "i", &header)) {
495 return NULL; 495 return NULL;
496 } 496 }
497 if (self->format_version != format_v1) { 497 if (self->format_version != format_v1) {
498 PyErr_Format(PyExc_RuntimeError, 498 PyErr_Format(PyExc_RuntimeError,
499 "version header should go in the docket, not the " 499 "version header should go in the docket, not the "