From 26132fb535801ea4762ba112a086195fd9c12a95 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 10 Sep 2003 10:53:23 +0000 Subject: [PATCH] (map_char_table): Protect `range' from GC. (map_char_table_for_charset): Likewise. --- src/ChangeLog | 5 +++++ src/chartab.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 6c92bf7cd88..7b567f5d287 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-09-10 Andreas Schwab + + * chartab.c (map_char_table): Protect `range' from GC. + (map_char_table_for_charset): Likewise. + 2003-07-31 Jan Dj,Ad(Brv * xfns.c (xg_set_icon): Rewrite to compile with GTK 2.0 and 2.2. diff --git a/src/chartab.c b/src/chartab.c index 1288d49929f..0004aa6cfb2 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -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; } -- 2.39.2