cext: shut-up sign compare warnings
authorJoerg Sonnenberger <joerg@bec.de>
Thu, 17 Dec 2020 18:08:25 +0100
changeset 46144 e4f6dae01b3b
parent 46143 dadca47e3d4d
child 46145 6383bb86b700
cext: shut-up sign compare warnings Differential Revision: https://phab.mercurial-scm.org/D9627
mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c	Thu Dec 17 10:43:43 2020 -0800
+++ b/mercurial/cext/revlog.c	Thu Dec 17 18:08:25 2020 +0100
@@ -2612,7 +2612,7 @@
 		                "data does not support buffer interface");
 		return -1;
 	}
-	if (self->nodelen < 20 || self->nodelen > sizeof(nullid)) {
+	if (self->nodelen < 20 || self->nodelen > (Py_ssize_t)sizeof(nullid)) {
 		PyErr_SetString(PyExc_RuntimeError, "unsupported node size");
 		return -1;
 	}