emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master c386f7e825 6/9: Make native helper functions static


From: Paul Eggert
Subject: master c386f7e825 6/9: Make native helper functions static
Date: Sat, 19 Mar 2022 15:49:04 -0400 (EDT)

branch: master
commit c386f7e825b425c9f80f8bb42ce329c127aa4d62
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    Make native helper functions static
    
    These don’t need to be extern, even with -flto, since
    their addresses are taken.
    * src/comp.c (helper_unwind_protect, helper_unbind_n)
    (helper_save_restriction, helper_GET_SYMBOL_WITH_POSITION)
    (helper_PSEUDOVECTOR_TYPEP_XUNTAG): Now static.
---
 src/comp.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/comp.c b/src/comp.c
index d0173491a2..50f92fe2cf 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -664,11 +664,12 @@ typedef struct {
    Helper functions called by the run-time.
 */
 
-void helper_unwind_protect (Lisp_Object handler);
-Lisp_Object helper_unbind_n (Lisp_Object n);
-void helper_save_restriction (void);
-bool helper_PSEUDOVECTOR_TYPEP_XUNTAG (Lisp_Object a, enum pvec_type code);
-struct Lisp_Symbol_With_Pos *helper_GET_SYMBOL_WITH_POSITION (Lisp_Object a);
+static void helper_unwind_protect (Lisp_Object);
+static Lisp_Object helper_unbind_n (Lisp_Object);
+static void helper_save_restriction (void);
+static bool helper_PSEUDOVECTOR_TYPEP_XUNTAG (Lisp_Object, enum pvec_type);
+static struct Lisp_Symbol_With_Pos *
+helper_GET_SYMBOL_WITH_POSITION (Lisp_Object);
 
 /* Note: helper_link_table must match the list created by
    `declare_runtime_imported_funcs'.  */
@@ -4973,7 +4974,7 @@ unknown (before GCC version 10).  */)
 /* for laziness. Change this if a performance impact is measured.             
*/
 
/******************************************************************************/
 
-void
+static void
 helper_unwind_protect (Lisp_Object handler)
 {
   /* Support for a function here is new in 24.4.  */
@@ -4981,20 +4982,20 @@ helper_unwind_protect (Lisp_Object handler)
                         handler);
 }
 
-Lisp_Object
+static Lisp_Object
 helper_unbind_n (Lisp_Object n)
 {
   return unbind_to (specpdl_ref_add (SPECPDL_INDEX (), -XFIXNUM (n)), Qnil);
 }
 
-void
+static void
 helper_save_restriction (void)
 {
   record_unwind_protect (save_restriction_restore,
                         save_restriction_save ());
 }
 
-bool
+static bool
 helper_PSEUDOVECTOR_TYPEP_XUNTAG (Lisp_Object a, enum pvec_type code)
 {
   return PSEUDOVECTOR_TYPEP (XUNTAG (a, Lisp_Vectorlike,
@@ -5002,7 +5003,7 @@ helper_PSEUDOVECTOR_TYPEP_XUNTAG (Lisp_Object a, enum 
pvec_type code)
                             code);
 }
 
-struct Lisp_Symbol_With_Pos *
+static struct Lisp_Symbol_With_Pos *
 helper_GET_SYMBOL_WITH_POSITION (Lisp_Object a)
 {
   if (!SYMBOL_WITH_POS_P (a))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]