Mercurial > emacs
changeset 81794:c1184a3d99c9
(map_char_table): Use an array of int for `indices' rather than
an array of Lisp_Objects (which are only ever integers anyway).
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 10 Jul 2007 15:40:06 +0000 |
parents | 935816f951c9 |
children | 15008ad392dc |
files | src/ChangeLog src/casetab.c src/fns.c src/fontset.c src/keymap.c src/lisp.h |
diffstat | 6 files changed, 29 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Tue Jul 10 15:23:36 2007 +0000 +++ b/src/ChangeLog Tue Jul 10 15:40:06 2007 +0000 @@ -1,5 +1,15 @@ 2007-07-10 Stefan Monnier <monnier@iro.umontreal.ca> + * fns.c (map_char_table): Use an array of int for `indices' rather than + an array of Lisp_Objects (which are only ever integers anyway). + (Fmap_char_table): Update caller. + * lisp.h: Update prototype. + * keymap.c (Fset_keymap_parent, map_keymap, Fcopy_keymap): + * fontset.c (Ffontset_info): + * casetab.c (set_case_table): Update callers. + + * editfns.c (Ftranspose_regions): Use EMACS_INT for positions. + * keymap.c (struct accessible_keymaps_data) (struct where_is_internal_data): New structures. (accessible_keymaps_1, where_is_internal_1): Use them to change @@ -17,9 +27,8 @@ (string_match_1, search_buffer, set_search_regs): Likewise. (syms_of_search): Add Lisp level definition for `inhibit-changing-match-data' and set it to nil. - (boyer_moore): If `inhibit-changing-match-data' is non-nil, - compute start and end of the match, instead of using values in - search_regs. + (boyer_moore): If `inhibit-changing-match-data' is non-nil, compute + start and end of the match, instead of using values in search_regs. 2007-07-01 Stefan Monnier <monnier@iro.umontreal.ca>
--- a/src/casetab.c Tue Jul 10 15:23:36 2007 +0000 +++ b/src/casetab.c Tue Jul 10 15:40:06 2007 +0000 @@ -126,7 +126,7 @@ int standard; { Lisp_Object up, canon, eqv; - Lisp_Object indices[3]; + int indices[3]; check_case_table (table);
--- a/src/fns.c Tue Jul 10 15:23:36 2007 +0000 +++ b/src/fns.c Tue Jul 10 15:40:06 2007 +0000 @@ -2825,8 +2825,8 @@ void map_char_table (c_function, function, table, subtable, arg, depth, indices) void (*c_function) P_ ((Lisp_Object, Lisp_Object, Lisp_Object)); - Lisp_Object function, table, subtable, arg, *indices; - int depth; + Lisp_Object function, table, subtable, arg; + int depth, *indices; { int i, to; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; @@ -2860,7 +2860,7 @@ } else { - int charset = XFASTINT (indices[0]) - 128; + int charset = indices[0] - 128; i = 32; to = SUB_CHAR_TABLE_ORDINARY_SLOTS; @@ -2874,8 +2874,8 @@ int charset; elt = XCHAR_TABLE (subtable)->contents[i]; - XSETFASTINT (indices[depth], i); - charset = XFASTINT (indices[0]) - 128; + indices[depth] = i; + charset = indices[0] - 128; if (depth == 0 && (!CHARSET_DEFINED_P (charset) || charset == CHARSET_8_BIT_CONTROL @@ -2892,8 +2892,8 @@ { int c1, c2, c; - c1 = depth >= 1 ? XFASTINT (indices[1]) : 0; - c2 = depth >= 2 ? XFASTINT (indices[2]) : 0; + c1 = depth >= 1 ? indices[1] : 0; + c2 = depth >= 2 ? indices[2] : 0; c = MAKE_CHAR (charset, c1, c2); if (NILP (elt)) @@ -2927,14 +2927,14 @@ Lisp_Object function, char_table; { /* The depth of char table is at most 3. */ - Lisp_Object indices[3]; + int indices[3]; CHECK_CHAR_TABLE (char_table); /* When Lisp_Object is represented as a union, `call2' cannot directly be passed to map_char_table because it returns a Lisp_Object rather than returning nothing. - Casting leads to crashes on some architectures. -stef */ + Casting leads to crashes on some architectures. --Stef */ map_char_table (void_call2, Qnil, char_table, char_table, function, 0, indices); return Qnil; }
--- a/src/fontset.c Tue Jul 10 15:23:36 2007 +0000 +++ b/src/fontset.c Tue Jul 10 15:40:06 2007 +0000 @@ -1437,7 +1437,7 @@ { Lisp_Object fontset; FRAME_PTR f; - Lisp_Object indices[3]; + int indices[3]; Lisp_Object val, tail, elt; Lisp_Object *realized; struct font_info *fontp = NULL;
--- a/src/keymap.c Tue Jul 10 15:23:36 2007 +0000 +++ b/src/keymap.c Tue Jul 10 15:40:06 2007 +0000 @@ -429,7 +429,7 @@ if (CHAR_TABLE_P (XCAR (list))) { - Lisp_Object indices[3]; + int indices[3]; map_char_table (fix_submap_inheritance, Qnil, XCAR (list), XCAR (list), @@ -728,7 +728,7 @@ } else if (CHAR_TABLE_P (binding)) { - Lisp_Object indices[3]; + int indices[3]; map_char_table (map_keymap_char_table_item, Qnil, binding, binding, Fcons (make_save_value (fun, 0), Fcons (make_save_value (data, 0), @@ -1079,7 +1079,7 @@ Lisp_Object elt = XCAR (keymap); if (CHAR_TABLE_P (elt)) { - Lisp_Object indices[3]; + int indices[3]; elt = Fcopy_sequence (elt); map_char_table (copy_keymap_1, Qnil, elt, elt, elt, 0, indices); }
--- a/src/lisp.h Tue Jul 10 15:23:36 2007 +0000 +++ b/src/lisp.h Tue Jul 10 15:40:06 2007 +0000 @@ -2428,7 +2428,7 @@ extern int char_table_translate P_ ((Lisp_Object, int)); extern void map_char_table P_ ((void (*) (Lisp_Object, Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, int, - Lisp_Object *)); + int *)); extern Lisp_Object char_table_ref_and_index P_ ((Lisp_Object, int, int *)); extern void syms_of_fns P_ ((void)); @@ -3244,6 +3244,7 @@ #endif /* Defined in xfaces.c */ +EXFUN (Fclear_face_cache, 1); extern void syms_of_xfaces P_ ((void)); #ifndef HAVE_GETLOADAVG @@ -3259,6 +3260,7 @@ extern void syms_of_xsmfns P_ ((void)); /* Defined in xselect.c */ +EXFUN (Fx_send_client_event, 6); extern void syms_of_xselect P_ ((void)); /* Defined in xterm.c */