# HG changeset patch # User Anton Shestakov # Date 2022-05-24 15:09:24 # Node ID d3d3495a5749fdd9b9611dda1d0eee75aa79e891 # Parent 675594a0a71aca072295bbe6b9d816c80df57d0e 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. diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c --- a/mercurial/cext/revlog.c +++ b/mercurial/cext/revlog.c @@ -491,7 +491,7 @@ static PyObject *index_pack_header(index { int header; char out[4]; - if (!PyArg_ParseTuple(args, "I", &header)) { + if (!PyArg_ParseTuple(args, "i", &header)) { return NULL; } if (self->format_version != format_v1) {