[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))
- master updated (71b8f1fc63 -> ccf4a4fa48), Paul Eggert, 2022/03/19
- master c3c5e50ba4 4/9: Use filenvercmp instead of doing it by hand, Paul Eggert, 2022/03/19
- master abfb76732c 2/9: Remove internal_condition_case_[345], Paul Eggert, 2022/03/19
- master a5cbd98376 3/9: Omit unnecessary code when !HAVE_NATIVE_COMP, Paul Eggert, 2022/03/19
- master 035e8e4d45 1/9: Remove sanitize_window_sizes, Paul Eggert, 2022/03/19
- master 0fed561042 5/9: Remove unused fns/data and make fns static, Paul Eggert, 2022/03/19
- master 495d8519ca 7/9: Simplify alloc.c static function decls, Paul Eggert, 2022/03/19
- master c11b4758b7 8/9: valid_sp inline fix, Paul Eggert, 2022/03/19
- master c386f7e825 6/9: Make native helper functions static,
Paul Eggert <=
- master ccf4a4fa48 9/9: Port to gcc -D EMACS_EXTERN_INLINE, Paul Eggert, 2022/03/19