From: Paul Eggert Date: Sat, 19 Mar 2022 19:35:04 +0000 (-0700) Subject: Make native helper functions static X-Git-Tag: emacs-29.0.90~1931^2~1038^2~3 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c386f7e825b425c9f80f8bb42ce329c127aa4d62;p=emacs.git 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. --- 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))