diff src/chartab.c @ 89484:5c41371d228b

(map_char_table): Protect `range' from GC. (map_char_table_for_charset): Likewise.
author Andreas Schwab <schwab@suse.de>
date Wed, 10 Sep 2003 10:52:45 +0000
parents 2f877ed80fa6
children c92884b9ca4a
line wrap: on
line diff
--- a/src/chartab.c	Mon Sep 08 12:53:41 2003 +0000
+++ b/src/chartab.c	Wed Sep 10 10:52:45 2003 +0000
@@ -773,8 +773,10 @@
 {
   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 @@
       else
 	call2 (function, range, val);
     }
+
+  UNGCPRO;
 }
 
 DEFUN ("map-char-table", Fmap_char_table, Smap_char_table,
@@ -913,8 +917,10 @@
 {
   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 @@
       else
 	call2 (function, range, arg);
     }
+
+  UNGCPRO;
 }