diff options
author | Alan Mackenzie <acm@muc.de> | 2017-02-12 10:59:03 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2017-02-12 10:59:03 +0000 |
commit | f4d5b687150810129b7a1d5b006e31ccf82b691b (patch) | |
tree | 4229b13800349032697daae3904dc3773e6b7a80 /src/regex.c | |
parent | d5514332d4a6092673ce1f78fadcae0c57f7be64 (diff) | |
parent | 148100d98319499f0ac6f57b8be08cbd14884a5c (diff) | |
download | emacs-comment-cache.tar.gz |
Merge branch 'master' into comment-cachecomment-cache
Diffstat (limited to 'src/regex.c')
-rw-r--r-- | src/regex.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/regex.c b/src/regex.c index db3f0c16a2d..796f868d1c2 100644 --- a/src/regex.c +++ b/src/regex.c @@ -1728,13 +1728,8 @@ typedef struct /* Explicit quit checking is needed for Emacs, which uses polling to process input events. */ -#ifdef emacs -# define IMMEDIATE_QUIT_CHECK \ - do { \ - if (immediate_quit) QUIT; \ - } while (0) -#else -# define IMMEDIATE_QUIT_CHECK ((void)0) +#ifndef emacs +static void maybe_quit (void) {} #endif /* Structure to manage work area for range table. */ @@ -5823,7 +5818,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1, /* Unconditionally jump (without popping any failure points). */ case jump: unconditional_jump: - IMMEDIATE_QUIT_CHECK; + maybe_quit (); EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */ DEBUG_PRINT ("EXECUTING jump %d ", mcnt); p += mcnt; /* Do the jump. */ @@ -6171,7 +6166,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1, /* We goto here if a matching operation fails. */ fail: - IMMEDIATE_QUIT_CHECK; + maybe_quit (); if (!FAIL_STACK_EMPTY ()) { re_char *str, *pat; |