diff options
author | Karl Heuer <kwzh@gnu.org> | 1997-10-16 18:28:41 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1997-10-16 18:28:41 +0000 |
commit | 23cf1efa9c4a7b56303f92f78d99739b00141a92 (patch) | |
tree | 75e234377bc4155dd840bbe82b46c09901f6f65a /src | |
parent | 7019cca7294072aebab263c204fb8335cae31a4b (diff) | |
download | emacs-23cf1efa9c4a7b56303f92f78d99739b00141a92.tar.gz |
(Faccessible_keymaps): Avoid alloca for fixed-size array.
(Fset_keymap_parent, Fcopy_keymap, Fwhere_is_internal): Likewise.
Diffstat (limited to 'src')
-rw-r--r-- | src/keymap.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/keymap.c b/src/keymap.c index 84acd616bed..96fe0af8c52 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -341,8 +341,7 @@ PARENT should be nil or another keymap.") if (CHAR_TABLE_P (XCONS (list)->car)) { - Lisp_Object *indices - = (Lisp_Object *) alloca (3 * sizeof (Lisp_Object)); + Lisp_Object indices[3]; map_char_table (fix_submap_inheritance, Qnil, XCONS (list)->car, keymap, 0, indices); @@ -707,8 +706,7 @@ is not copied.") elt = XCONS (tail)->car; if (CHAR_TABLE_P (elt)) { - Lisp_Object *indices - = (Lisp_Object *) alloca (3 * sizeof (Lisp_Object)); + Lisp_Object indices[3]; elt = Fcopy_sequence (elt); XCONS (tail)->car = elt; @@ -1434,8 +1432,7 @@ then the value includes only maps for prefixes that start with PREFIX.") if (CHAR_TABLE_P (elt)) { - Lisp_Object *indices - = (Lisp_Object *) alloca (3 * sizeof (Lisp_Object)); + Lisp_Object indices[3]; map_char_table (accessible_keymaps_char_table, Qnil, elt, Fcons (maps, Fcons (tail, thisseq)), @@ -1985,9 +1982,9 @@ indirect definition itself.") } else if (CHAR_TABLE_P (elt)) { - Lisp_Object *indices - = (Lisp_Object *) alloca (3 * sizeof (Lisp_Object)); + Lisp_Object indices[3]; Lisp_Object args; + args = Fcons (Fcons (Fcons (definition, noindirect), Fcons (keymap, Qnil)), Fcons (Fcons (this, last), |