Subject: bug#59118: [PATCH] Prefix all itree functions with itree_

From: Matt Armstrong <[email-masked]>
Date: Mon, 07 Nov 2022 21:29:15 -0800

Tags: patch

X-Debbugs-CC: Eli Zaretskii <[email-masked]>, Basil L. Contovounesios <[email-masked]>

Steph and I put some effort into prefixing all functions in itree.h with
itree_.  It would be nice to be consistent with that.

In GNU Emacs 29.0.50 (build 9, x86_64-pc-linux-gnu, GTK+ Version
 3.24.34, cairo version 1.16.0) of 2022-11-07 built on naz
Repository revision: d04433b96215d7d3387573f19cc315de86f2341a
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12201003
System Description: Debian GNU/Linux bookworm/sid

Configured using:
 'configure 'CFLAGS=-O2 -g3''

>From 3318c0688814de5d68a20038ff03d7376d4fd129 Mon Sep 17 00:00:00 2001
From: Matt Armstrong <[email-masked]>
Date: Mon, 7 Nov 2022 21:21:36 -0800
Subject: [PATCH] Prefix all itree functions with itree_

* src/itree.h: init_itree -> itree_init, forget_itree to itree_forget.
* src/itree.c (itree_init): Rename.
(itree_forget): Rename.
* test/manual/noverlay/itree-tests.c (main): Handle rename.
---
 src/emacs.c                        | 4 ++--
 src/itree.c                        | 4 ++--
 src/itree.h                        | 4 ++--
 test/manual/noverlay/itree-tests.c | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/emacs.c b/src/emacs.c
index 1b2aa9442b7..d61cb4e1570 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1932,7 +1932,7 @@ main (int argc, char **argv)
   running_asynch_code = 0;
   init_random ();
   init_xfaces ();
-  init_itree ();
+  itree_init ();
 
 #if defined HAVE_JSON && !defined WINDOWSNT
   init_json ();
@@ -3105,7 +3105,7 @@ DEFUN ("dump-emacs", Fdump_emacs, Sdump_emacs, 2, 2, 0,
   gflags.will_dump_with_unexec_ = false;
   gflags.dumped_with_unexec_ = true;
 
-  forget_itree ();
+  itree_forget ();
 
   alloc_unexec_pre ();
 
diff --git a/src/itree.c b/src/itree.c
index 989173db4e5..9088e3985eb 100644
--- a/src/itree.c
+++ b/src/itree.c
@@ -288,7 +288,7 @@ itree_iterator_create (struct itree_tree *tree)
 }
 
 void
-init_itree (void)
+itree_init (void)
 {
   eassert (!iter);
   iter = itree_iterator_create (NULL);
@@ -296,7 +296,7 @@ init_itree (void)
 
 #ifdef HAVE_UNEXEC
 void
-forget_itree (void)
+itree_forget (void)
 {
   iter = NULL;
 }
diff --git a/src/itree.h b/src/itree.h
index 10ee0897c37..5fdb4020dbd 100644
--- a/src/itree.h
+++ b/src/itree.h
@@ -106,9 +106,9 @@ #define ITREE_H
     ITREE_PRE_ORDER,
   };
 
-extern void init_itree (void);
+extern void itree_init (void);
 #ifdef HAVE_UNEXEC
-extern void forget_itree (void);
+extern void itree_forget (void);
 #endif
 extern void itree_node_init (struct itree_node *, bool, bool, Lisp_Object);
 extern ptrdiff_t itree_node_begin (struct itree_tree *, struct itree_node *);
diff --git a/test/manual/noverlay/itree-tests.c b/test/manual/noverlay/itree-tests.c
index 278e65f9bf7..08d4f357e24 100644
--- a/test/manual/noverlay/itree-tests.c
+++ b/test/manual/noverlay/itree-tests.c
@@ -1281,7 +1281,7 @@ main (void)
   Suite *s = basic_suite ();
   SRunner *sr = srunner_create (s);
 
-  init_itree ();
+  itree_init ();
   srunner_run_all (sr, CK_ENV);
   int nfailed = srunner_ntests_failed (sr);
   srunner_free (sr);
-- 
2.35.1