changeset 17192:56ba760172b4

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.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 20 Nov 2012 22:25:10 -0800
parents d27d22e71282
children 52867afa3702
files ChangeLog lib/regex_internal.c lib/regex_internal.h
diffstat 3 files changed, 23 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- a/lib/regex_internal.c
+++ b/lib/regex_internal.c
@@ -1454,7 +1454,7 @@
   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)
 {
--- 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 @@
 } 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_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 @@
        & ~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 @@
     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 @@
 }
 
 #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 @@
   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)
 {