From e757f1c6f393cf82057dbee0a4325b07f0fd55c4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 18 Aug 2012 16:53:43 -0700 Subject: [PATCH] port new setting code to Sun C 5.8 2005/10/13 * chartab.c, lisp.h (char_table_set, char_table_set_range): Return void, not Lisp_Object. Otherwise, the compiler complains about (A?B:C) where B is void and C is Lisp_Object when compiling CHAR_TABLE_SET, due to the recent change to the API of sub_char_table_set_contents. --- src/ChangeLog | 9 +++++++++ src/chartab.c | 6 ++---- src/lisp.h | 5 ++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index beb47d6c998..1956d602e6a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2012-08-18 Paul Eggert + + port new setting code to Sun C 5.8 2005/10/13 + * chartab.c, lisp.h (char_table_set, char_table_set_range): + Return void, not Lisp_Object. Otherwise, the compiler + complains about (A?B:C) where B is void and C is Lisp_Object + when compiling CHAR_TABLE_SET, due to the recent change to + the API of sub_char_table_set_contents. + 2012-08-18 Chong Yidong * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE diff --git a/src/chartab.c b/src/chartab.c index 25d331b73e2..711a49ed397 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -411,7 +411,7 @@ sub_char_table_set (Lisp_Object table, int c, Lisp_Object val, int is_uniprop) } } -Lisp_Object +void char_table_set (Lisp_Object table, int c, Lisp_Object val) { struct Lisp_Char_Table *tbl = XCHAR_TABLE (table); @@ -434,7 +434,6 @@ char_table_set (Lisp_Object table, int c, Lisp_Object val) if (ASCII_CHAR_P (c)) set_char_table_ascii (table, char_table_ascii (table)); } - return val; } static void @@ -476,7 +475,7 @@ sub_char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val, } -Lisp_Object +void char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val) { struct Lisp_Char_Table *tbl = XCHAR_TABLE (table); @@ -510,7 +509,6 @@ char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val) if (ASCII_CHAR_P (from)) set_char_table_ascii (table, char_table_ascii (table)); } - return val; } diff --git a/src/lisp.h b/src/lisp.h index 4a6edcda53c..f08e7af8959 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2915,9 +2915,8 @@ extern Lisp_Object copy_char_table (Lisp_Object); extern Lisp_Object char_table_ref (Lisp_Object, int); extern Lisp_Object char_table_ref_and_range (Lisp_Object, int, int *, int *); -extern Lisp_Object char_table_set (Lisp_Object, int, Lisp_Object); -extern Lisp_Object char_table_set_range (Lisp_Object, int, int, - Lisp_Object); +extern void char_table_set (Lisp_Object, int, Lisp_Object); +extern void char_table_set_range (Lisp_Object, int, int, Lisp_Object); extern int char_table_translate (Lisp_Object, int); extern void map_char_table (void (*) (Lisp_Object, Lisp_Object, Lisp_Object), -- 2.39.5