cext: fix truncation warnings in revlog on Windows
authorMatt Harbison <matt_harbison@yahoo.com>
Tue, 21 Aug 2018 21:05:15 -0400
changeset 39228 66f046116105
parent 39227 42cc76d0f836
child 39229 2646b8d66b7b
cext: fix truncation warnings in revlog on Windows
mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c	Tue Aug 21 20:57:58 2018 -0400
+++ b/mercurial/cext/revlog.c	Tue Aug 21 21:05:15 2018 -0400
@@ -457,7 +457,7 @@
 			Py_DECREF(iter_item);
 			if (iter_item_long < min_idx)
 				min_idx = iter_item_long;
-			phases[iter_item_long] = marker;
+			phases[iter_item_long] = (char)marker;
 		}
 		Py_DECREF(iter);
 	}
@@ -1100,7 +1100,7 @@
 		return NULL;
 	}
 	node = index_node_existing(self->index, rev);
-	if (nt_insert(self, node, rev) == -1)
+	if (nt_insert(self, node, (int)rev) == -1)
 		return NULL;
 	Py_RETURN_NONE;
 }
@@ -1283,7 +1283,7 @@
 		if (self->nt == NULL) {
 			return -1;
 		}
-		if (nt_init(self->nt, self, self->raw_length) == -1) {
+		if (nt_init(self->nt, self, (int)self->raw_length) == -1) {
 			nt_dealloc(self->nt);
 			self->nt = NULL;
 			return -1;