emacs-diffs
[Top][All Lists]
Advanced

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

master 24849c1: Inline a couple of functions that were macros


From: Paul Eggert
Subject: master 24849c1: Inline a couple of functions that were macros
Date: Sat, 25 Apr 2020 19:18:49 -0400 (EDT)

branch: master
commit 24849c1b8d348379203c07c400bedfd42059963f
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Inline a couple of functions that were macros
    
    This reclaims a bit of performance when compiling with gcc -Og.
    These functions were macros until I changed them in
    2020-04-17T14:57:25Z!address@hidden.
    * src/casefiddle.c (make_char_unibyte):
    * src/ccl.c (GET_TRANSLATION_TABLE): Now inline.
---
 src/casefiddle.c | 2 +-
 src/ccl.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/casefiddle.c b/src/casefiddle.c
index 9a711a8..debd241 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -221,7 +221,7 @@ case_character (struct casing_str_buf *buf, struct 
casing_context *ctx,
 }
 
 /* If C is not ASCII, make it unibyte. */
-static int
+static inline int
 make_char_unibyte (int c)
 {
   return ASCII_CHAR_P (c) ? c : CHAR_TO_BYTE8 (c);
diff --git a/src/ccl.c b/src/ccl.c
index 0f82b97..ef059ff 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -856,7 +856,7 @@ struct ccl_prog_stack
 static struct ccl_prog_stack ccl_prog_stack_struct[256];
 
 /* Return a translation table of id number ID.  */
-static Lisp_Object
+static inline Lisp_Object
 GET_TRANSLATION_TABLE (int id)
 {
   return XCDR (XVECTOR (Vtranslation_table_vector)->contents[id]);



reply via email to

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