revlog: use appropriate format char for int ("i" instead of "I")
authorAnton Shestakov <av6@dwimlabs.net>
Tue, 24 May 2022 19:09:24 +0400
changeset 49212 d3d3495a5749
parent 49211 675594a0a71a
child 49217 13dfad0f9f7a
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.
mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c	Tue May 17 21:49:36 2022 +0400
+++ b/mercurial/cext/revlog.c	Tue May 24 19:09:24 2022 +0400
@@ -491,7 +491,7 @@
 {
 	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) {