(map_char_table): Protect `range' from GC.
authorAndreas Schwab <schwab@suse.de>
Wed, 10 Sep 2003 10:53:23 +0000 (10:53 +0000)
committerAndreas Schwab <schwab@suse.de>
Wed, 10 Sep 2003 10:53:23 +0000 (10:53 +0000)
(map_char_table_for_charset): Likewise.

src/ChangeLog
src/chartab.c

index 6c92bf7..7b567f5 100644 (file)
@@ -1,3 +1,8 @@
+2003-09-10  Andreas Schwab  <schwab@suse.de>
+
+       * chartab.c (map_char_table): Protect `range' from GC.
+       (map_char_table_for_charset): Likewise.
+
 2003-07-31  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
 
        * xfns.c (xg_set_icon): Rewrite to compile with GTK 2.0 and 2.2.
index 1288d49..0004aa6 100644 (file)
@@ -773,8 +773,10 @@ map_char_table (c_function, function, table, arg)
 {
   Lisp_Object range, val;
   int c, i;
+  struct gcpro gcpro1;
 
   range = Fcons (make_number (0), Qnil);
+  GCPRO1 (range);
   val = XCHAR_TABLE (table)->ascii;
   if (SUB_CHAR_TABLE_P (val))
     val = XSUB_CHAR_TABLE (val)->contents[0];
@@ -818,6 +820,8 @@ map_char_table (c_function, function, table, arg)
       else
        call2 (function, range, val);
     }
+
+  UNGCPRO;
 }
 
 DEFUN ("map-char-table", Fmap_char_table, Smap_char_table,
@@ -913,8 +917,10 @@ map_char_table_for_charset (c_function, function, table, arg,
 {
   Lisp_Object range;
   int c, i;
+  struct gcpro gcpro1;
 
   range = Fcons (Qnil, Qnil);
+  GCPRO1 (range);
 
   for (i = 0, c = 0; i < chartab_size[0]; i++, c += chartab_chars[0])
     {
@@ -945,6 +951,8 @@ map_char_table_for_charset (c_function, function, table, arg,
       else
        call2 (function, range, arg);
     }
+
+  UNGCPRO;
 }
 
 \f