changeset 38942:3e74c01102af

index: rename "nt_*(indexObject *self,...)" functions to "index_*" These functions do something with the nodetree, but they're less generic and won't make sense as methods on the nodetree when it becomes a Python type. Differential Revision: https://phab.mercurial-scm.org/D4115
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 19 Jul 2018 00:03:45 -0700
parents c0b6a7c78a21
children 2b89e20c450c
files mercurial/cext/revlog.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cext/revlog.c	Wed Jul 18 12:03:31 2018 -0700
+++ b/mercurial/cext/revlog.c	Thu Jul 19 00:03:45 2018 -0700
@@ -1251,7 +1251,7 @@
 /*
  * Fully populate the radix tree.
  */
-static int nt_populate(indexObject *self) {
+static int index_populate_nt(indexObject *self) {
 	int rev;
 	if (self->ntrev > 0) {
 		for (rev = self->ntrev - 1; rev >= 0; rev--) {
@@ -1348,7 +1348,7 @@
 
 	if (index_init_nt(self) == -1)
 		return NULL;
-	if (nt_populate(self) == -1)
+	if (index_populate_nt(self) == -1)
 		return NULL;
 	rev = nt_partialmatch(self->nt, node, nodelen);
 
@@ -1383,7 +1383,7 @@
 	self->ntlookups++;
 	if (index_init_nt(self) == -1)
 		return NULL;
-	if (nt_populate(self) == -1)
+	if (index_populate_nt(self) == -1)
 		return NULL;
 	length = nt_shortest(self->nt, node);
 	if (length == -3)
@@ -1799,7 +1799,7 @@
 /*
  * Invalidate any trie entries introduced by added revs.
  */
-static void nt_invalidate_added(indexObject *self, Py_ssize_t start)
+static void index_invalidate_added(indexObject *self, Py_ssize_t start)
 {
 	Py_ssize_t i, len = PyList_GET_SIZE(self->added);
 
@@ -1869,7 +1869,7 @@
 				nt_delete_node(self->nt, node);
 			}
 			if (self->added)
-				nt_invalidate_added(self, 0);
+				index_invalidate_added(self, 0);
 			if (self->ntrev > start)
 				self->ntrev = (int)start;
 		}
@@ -1886,7 +1886,7 @@
 	}
 
 	if (self->nt) {
-		nt_invalidate_added(self, start - self->length + 1);
+		index_invalidate_added(self, start - self->length + 1);
 		if (self->ntrev > start)
 			self->ntrev = (int)start;
 	}