aboutsummaryrefslogtreecommitdiffstats
path: root/src/regex.c
diff options
context:
space:
mode:
authorAlan Mackenzie2017-02-12 10:59:03 +0000
committerAlan Mackenzie2017-02-12 10:59:03 +0000
commitf4d5b687150810129b7a1d5b006e31ccf82b691b (patch)
tree4229b13800349032697daae3904dc3773e6b7a80 /src/regex.c
parentd5514332d4a6092673ce1f78fadcae0c57f7be64 (diff)
parent148100d98319499f0ac6f57b8be08cbd14884a5c (diff)
downloademacs-comment-cache.tar.gz
emacs-comment-cache.zip
Merge branch 'master' into comment-cachecomment-cache
Diffstat (limited to 'src/regex.c')
-rw-r--r--src/regex.c13
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
1728 1728
1729/* Explicit quit checking is needed for Emacs, which uses polling to 1729/* Explicit quit checking is needed for Emacs, which uses polling to
1730 process input events. */ 1730 process input events. */
1731#ifdef emacs 1731#ifndef emacs
1732# define IMMEDIATE_QUIT_CHECK \ 1732static void maybe_quit (void) {}
1733 do { \
1734 if (immediate_quit) QUIT; \
1735 } while (0)
1736#else
1737# define IMMEDIATE_QUIT_CHECK ((void)0)
1738#endif 1733#endif
1739 1734
1740/* Structure to manage work area for range table. */ 1735/* 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,
5823 /* Unconditionally jump (without popping any failure points). */ 5818 /* Unconditionally jump (without popping any failure points). */
5824 case jump: 5819 case jump:
5825 unconditional_jump: 5820 unconditional_jump:
5826 IMMEDIATE_QUIT_CHECK; 5821 maybe_quit ();
5827 EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */ 5822 EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */
5828 DEBUG_PRINT ("EXECUTING jump %d ", mcnt); 5823 DEBUG_PRINT ("EXECUTING jump %d ", mcnt);
5829 p += mcnt; /* Do the jump. */ 5824 p += mcnt; /* Do the jump. */
@@ -6171,7 +6166,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1,
6171 6166
6172 /* We goto here if a matching operation fails. */ 6167 /* We goto here if a matching operation fails. */
6173 fail: 6168 fail:
6174 IMMEDIATE_QUIT_CHECK; 6169 maybe_quit ();
6175 if (!FAIL_STACK_EMPTY ()) 6170 if (!FAIL_STACK_EMPTY ())
6176 { 6171 {
6177 re_char *str, *pat; 6172 re_char *str, *pat;