From c386f7e825b425c9f80f8bb42ce329c127aa4d62 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 19 Mar 2022 12:35:04 -0700 Subject: [PATCH] Make native helper functions static MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 d0173491a2e..50f92fe2cfe 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)) -- 2.39.2