bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH 10/13] regex: no 'static inline'


From: Paul Eggert
Subject: [PATCH 10/13] regex: no 'static inline'
Date: Thu, 08 Nov 2012 23:51:55 -0800
User-agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121028 Thunderbird/16.0.2

* lib/regex_internal.c (calc_state_hash):
* lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain)
(bitset_empty, bitset_set_all, bitset_copy, bitset_not, bitset_merge)
(bitset_mask, re_string_char_size_at, re_string_wchar_at):
Now static, not static inline.
(inline) [__GNUC__ < 3 && _LIBC]:
Remove macro; no longer needed.
---
 ChangeLog            |  9 +++++++++
 lib/regex_internal.c |  2 +-
 lib/regex_internal.h | 29 +++++++++++++----------------
 3 files changed, 23 insertions(+), 17 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b165e9e..89011184 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2012-11-08  Paul Eggert  <address@hidden>
 
+       regex: no 'static inline'
+       * lib/regex_internal.c (calc_state_hash):
+       * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain)
+       (bitset_empty, bitset_set_all, bitset_copy, bitset_not, bitset_merge)
+       (bitset_mask, re_string_char_size_at, re_string_wchar_at):
+       Now static, not static inline.
+       (inline) [__GNUC__ < 3 && _LIBC]:
+       Remove macro; no longer needed.
+
        xvasprintf: no 'static inline'
        * lib/xvasprintf.c (xstrcat):
        Now static, not static inline.
diff --git a/lib/regex_internal.c b/lib/regex_internal.c
index 7e8c1bc..7bb6435 100644
--- a/lib/regex_internal.c
+++ b/lib/regex_internal.c
@@ -1454,7 +1454,7 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
   return dfa->nodes_len++;
 }
 
-static inline re_hashval_t
+static re_hashval_t
 internal_function
 calc_state_hash (const re_node_set *nodes, unsigned int context)
 {
diff --git a/lib/regex_internal.h b/lib/regex_internal.h
index 2b9f697..a8362ed 100644
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -83,9 +83,6 @@
 # define BE(expr, val) __builtin_expect (expr, val)
 #else
 # define BE(expr, val) (expr)
-# ifdef _LIBC
-#  define inline
-# endif
 #endif
 
 /* Number of ASCII characters.  */
@@ -727,33 +724,33 @@ typedef struct
 } bracket_elem_t;
 
 
-/* Inline functions for bitset_t operation.  */
+/* Functions for bitset_t operation.  */
 
-static inline void
+static void
 bitset_set (bitset_t set, Idx i)
 {
   set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS;
 }
 
-static inline void
+static void
 bitset_clear (bitset_t set, Idx i)
 {
   set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS);
 }
 
-static inline bool
+static bool
 bitset_contain (const bitset_t set, Idx i)
 {
   return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1;
 }
 
-static inline void
+static void
 bitset_empty (bitset_t set)
 {
   memset (set, '\0', sizeof (bitset_t));
 }
 
-static inline void
+static void
 bitset_set_all (bitset_t set)
 {
   memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS));
@@ -762,13 +759,13 @@ bitset_set_all (bitset_t set)
       ((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1;
 }
 
-static inline void
+static void
 bitset_copy (bitset_t dest, const bitset_t src)
 {
   memcpy (dest, src, sizeof (bitset_t));
 }
 
-static inline void
+static void
 bitset_not (bitset_t set)
 {
   int bitset_i;
@@ -780,7 +777,7 @@ bitset_not (bitset_t set)
        & ~set[BITSET_WORDS - 1]);
 }
 
-static inline void
+static void
 bitset_merge (bitset_t dest, const bitset_t src)
 {
   int bitset_i;
@@ -788,7 +785,7 @@ bitset_merge (bitset_t dest, const bitset_t src)
     dest[bitset_i] |= src[bitset_i];
 }
 
-static inline void
+static void
 bitset_mask (bitset_t dest, const bitset_t src)
 {
   int bitset_i;
@@ -797,8 +794,8 @@ bitset_mask (bitset_t dest, const bitset_t src)
 }
 
 #ifdef RE_ENABLE_I18N
-/* Inline functions for re_string.  */
-static inline int
+/* Functions for re_string.  */
+static int
 internal_function __attribute ((pure))
 re_string_char_size_at (const re_string_t *pstr, Idx idx)
 {
@@ -811,7 +808,7 @@ re_string_char_size_at (const re_string_t *pstr, Idx idx)
   return byte_idx;
 }
 
-static inline wint_t
+static wint_t
 internal_function __attribute ((pure))
 re_string_wchar_at (const re_string_t *pstr, Idx idx)
 {
-- 
1.7.11.7




reply via email to

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