aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 69391bac9ed..9f5ef754e2a 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1567,6 +1567,7 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim,
1567 const unsigned char *str; 1567 const unsigned char *str;
1568 int len; 1568 int len;
1569 Lisp_Object iso_classes; 1569 Lisp_Object iso_classes;
1570 USE_SAFE_ALLOCA;
1570 1571
1571 CHECK_STRING (string); 1572 CHECK_STRING (string);
1572 iso_classes = Qnil; 1573 iso_classes = Qnil;
@@ -1699,7 +1700,7 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim,
1699 memcpy (himap, fastmap + 0200, 0200); 1700 memcpy (himap, fastmap + 0200, 0200);
1700 himap[0200] = 0; 1701 himap[0200] = 0;
1701 memset (fastmap + 0200, 0, 0200); 1702 memset (fastmap + 0200, 0, 0200);
1702 char_ranges = alloca (sizeof *char_ranges * 128 * 2); 1703 SAFE_NALLOCA (char_ranges, 2, 128);
1703 i = 0; 1704 i = 0;
1704 1705
1705 while ((p1 = memchr (himap + i, 1, 0200 - i))) 1706 while ((p1 = memchr (himap + i, 1, 0200 - i)))
@@ -1723,7 +1724,7 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim,
1723 } 1724 }
1724 else /* STRING is multibyte */ 1725 else /* STRING is multibyte */
1725 { 1726 {
1726 char_ranges = alloca (sizeof *char_ranges * SCHARS (string) * 2); 1727 SAFE_NALLOCA (char_ranges, 2, SCHARS (string));
1727 1728
1728 while (i_byte < size_byte) 1729 while (i_byte < size_byte)
1729 { 1730 {
@@ -2032,6 +2033,7 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim,
2032 SET_PT_BOTH (pos, pos_byte); 2033 SET_PT_BOTH (pos, pos_byte);
2033 immediate_quit = 0; 2034 immediate_quit = 0;
2034 2035
2036 SAFE_FREE ();
2035 return make_number (PT - start_point); 2037 return make_number (PT - start_point);
2036 } 2038 }
2037} 2039}