regex: no 'static inline'
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 21 Nov 2012 06:25:10 +0000 (22:25 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 30 Nov 2012 07:38:57 +0000 (23:38 -0800)
* 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
lib/regex_internal.c
lib/regex_internal.h

index 77836fd..4d2fce3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2012-11-29  Paul Eggert  <eggert@cs.ucla.edu>
 
+       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.
index 7e8c1bc..7bb6435 100644 (file)
@@ -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)
 {
index 2b9f697..a8362ed 100644 (file)
@@ -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)
 {