changeset 39256:66f046116105

cext: fix truncation warnings in revlog on Windows
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 21 Aug 2018 21:05:15 -0400
parents 42cc76d0f836
children 2646b8d66b7b
files mercurial/cext/revlog.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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;