[PATCH 1 of 2 V4] changelog: change input type of index_get_parents

Laurent Charignon lcharignon at fb.com
Tue May 26 19:27:41 UTC 2015


# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1432667330 25200
#      Tue May 26 12:08:50 2015 -0700
# Node ID 3e9c4885541a63af6743240c4ab1b8fbdf8f5d14
# Parent  b81fc91628a89ca43fc42065c914233d13e9aa9b
changelog: change input type of index_get_parents

We were wrongfully using int instead of Py_ssize_t for the revision number.

diff --git a/mercurial/parsers.c b/mercurial/parsers.c
--- a/mercurial/parsers.c
+++ b/mercurial/parsers.c
@@ -1177,7 +1177,8 @@
 	return ret;
 }
 
-static inline void index_get_parents(indexObject *self, int rev, int *ps)
+static inline void index_get_parents(indexObject *self, Py_ssize_t rev,
+				int *ps)
 {
 	if (rev >= self->length - 1) {
 		PyObject *tuple = PyList_GET_ITEM(self->added,


More information about the Mercurial-devel mailing list