Summary: chore, replace nested function construct by cpp equivalent
authorSebastian Freundt <freundt@ga-group.nl>
Wed, 4 Jan 2012 10:33:55 +0000 (10:33 +0000)
committerSebastian Freundt <freundt@ga-group.nl>
Wed, 4 Jan 2012 10:33:55 +0000 (10:33 +0000)
Keywords: build clang

This changeset replaces a nested function left-over, introduced to
provide closure (over the compile stack), by a more portable
pre-processor construct.

* src/regex.c (regex_compile): auto inline foo -> #define

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
src/regex.c

index b5ced47..a3da58b 100644 (file)
@@ -2101,14 +2101,9 @@ regex_compile(re_char * pattern, int size, reg_syntax_t syntax,
           matching close-group on the compile stack, so the same register
           number is put in the stop_memory as the start_memory.  */
        regnum_t regnum = 0;
-       auto inline void free_stack(void) __attribute__((always_inline));
 
        /* we need to close over compile_stack */
-       auto inline void free_stack(void)
-       {
-               xfree(compile_stack.stack);
-               return;
-       }
+#      define free_stack(args...)      xfree(compile_stack.stack)
 
 #ifdef REGEX_DEBUG_FLAG
        DEBUG_PRINT1("\nCompiling pattern: ");