aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Schwab2003-09-10 10:53:23 +0000
committerAndreas Schwab2003-09-10 10:53:23 +0000
commit26132fb535801ea4762ba112a086195fd9c12a95 (patch)
treed3e7f0b2f8648d2ec6489aba5a6f73d443933d9f /src
parent8f924df7df019cce90537647de2627581043b5c4 (diff)
downloademacs-26132fb535801ea4762ba112a086195fd9c12a95.tar.gz
emacs-26132fb535801ea4762ba112a086195fd9c12a95.zip
(map_char_table): Protect `range' from GC.
(map_char_table_for_charset): Likewise.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/chartab.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6c92bf7cd88..7b567f5d287 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12003-09-10 Andreas Schwab <schwab@suse.de>
2
3 * chartab.c (map_char_table): Protect `range' from GC.
4 (map_char_table_for_charset): Likewise.
5
12003-07-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 62003-07-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 7
3 * xfns.c (xg_set_icon): Rewrite to compile with GTK 2.0 and 2.2. 8 * 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)
773{ 773{
774 Lisp_Object range, val; 774 Lisp_Object range, val;
775 int c, i; 775 int c, i;
776 struct gcpro gcpro1;
776 777
777 range = Fcons (make_number (0), Qnil); 778 range = Fcons (make_number (0), Qnil);
779 GCPRO1 (range);
778 val = XCHAR_TABLE (table)->ascii; 780 val = XCHAR_TABLE (table)->ascii;
779 if (SUB_CHAR_TABLE_P (val)) 781 if (SUB_CHAR_TABLE_P (val))
780 val = XSUB_CHAR_TABLE (val)->contents[0]; 782 val = XSUB_CHAR_TABLE (val)->contents[0];
@@ -818,6 +820,8 @@ map_char_table (c_function, function, table, arg)
818 else 820 else
819 call2 (function, range, val); 821 call2 (function, range, val);
820 } 822 }
823
824 UNGCPRO;
821} 825}
822 826
823DEFUN ("map-char-table", Fmap_char_table, Smap_char_table, 827DEFUN ("map-char-table", Fmap_char_table, Smap_char_table,
@@ -913,8 +917,10 @@ map_char_table_for_charset (c_function, function, table, arg,
913{ 917{
914 Lisp_Object range; 918 Lisp_Object range;
915 int c, i; 919 int c, i;
920 struct gcpro gcpro1;
916 921
917 range = Fcons (Qnil, Qnil); 922 range = Fcons (Qnil, Qnil);
923 GCPRO1 (range);
918 924
919 for (i = 0, c = 0; i < chartab_size[0]; i++, c += chartab_chars[0]) 925 for (i = 0, c = 0; i < chartab_size[0]; i++, c += chartab_chars[0])
920 { 926 {
@@ -945,6 +951,8 @@ map_char_table_for_charset (c_function, function, table, arg,
945 else 951 else
946 call2 (function, range, arg); 952 call2 (function, range, arg);
947 } 953 }
954
955 UNGCPRO;
948} 956}
949 957
950 958