diff options
| author | Karl Heuer | 1997-10-16 18:28:41 +0000 |
|---|---|---|
| committer | Karl Heuer | 1997-10-16 18:28:41 +0000 |
| commit | 23cf1efa9c4a7b56303f92f78d99739b00141a92 (patch) | |
| tree | 75e234377bc4155dd840bbe82b46c09901f6f65a /src | |
| parent | 7019cca7294072aebab263c204fb8335cae31a4b (diff) | |
| download | emacs-23cf1efa9c4a7b56303f92f78d99739b00141a92.tar.gz emacs-23cf1efa9c4a7b56303f92f78d99739b00141a92.zip | |
(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.") | |||
| 341 | 341 | ||
| 342 | if (CHAR_TABLE_P (XCONS (list)->car)) | 342 | if (CHAR_TABLE_P (XCONS (list)->car)) |
| 343 | { | 343 | { |
| 344 | Lisp_Object *indices | 344 | Lisp_Object indices[3]; |
| 345 | = (Lisp_Object *) alloca (3 * sizeof (Lisp_Object)); | ||
| 346 | 345 | ||
| 347 | map_char_table (fix_submap_inheritance, Qnil, XCONS (list)->car, | 346 | map_char_table (fix_submap_inheritance, Qnil, XCONS (list)->car, |
| 348 | keymap, 0, indices); | 347 | keymap, 0, indices); |
| @@ -707,8 +706,7 @@ is not copied.") | |||
| 707 | elt = XCONS (tail)->car; | 706 | elt = XCONS (tail)->car; |
| 708 | if (CHAR_TABLE_P (elt)) | 707 | if (CHAR_TABLE_P (elt)) |
| 709 | { | 708 | { |
| 710 | Lisp_Object *indices | 709 | Lisp_Object indices[3]; |
| 711 | = (Lisp_Object *) alloca (3 * sizeof (Lisp_Object)); | ||
| 712 | 710 | ||
| 713 | elt = Fcopy_sequence (elt); | 711 | elt = Fcopy_sequence (elt); |
| 714 | XCONS (tail)->car = elt; | 712 | XCONS (tail)->car = elt; |
| @@ -1434,8 +1432,7 @@ then the value includes only maps for prefixes that start with PREFIX.") | |||
| 1434 | 1432 | ||
| 1435 | if (CHAR_TABLE_P (elt)) | 1433 | if (CHAR_TABLE_P (elt)) |
| 1436 | { | 1434 | { |
| 1437 | Lisp_Object *indices | 1435 | Lisp_Object indices[3]; |
| 1438 | = (Lisp_Object *) alloca (3 * sizeof (Lisp_Object)); | ||
| 1439 | 1436 | ||
| 1440 | map_char_table (accessible_keymaps_char_table, Qnil, | 1437 | map_char_table (accessible_keymaps_char_table, Qnil, |
| 1441 | elt, Fcons (maps, Fcons (tail, thisseq)), | 1438 | elt, Fcons (maps, Fcons (tail, thisseq)), |
| @@ -1985,9 +1982,9 @@ indirect definition itself.") | |||
| 1985 | } | 1982 | } |
| 1986 | else if (CHAR_TABLE_P (elt)) | 1983 | else if (CHAR_TABLE_P (elt)) |
| 1987 | { | 1984 | { |
| 1988 | Lisp_Object *indices | 1985 | Lisp_Object indices[3]; |
| 1989 | = (Lisp_Object *) alloca (3 * sizeof (Lisp_Object)); | ||
| 1990 | Lisp_Object args; | 1986 | Lisp_Object args; |
| 1987 | |||
| 1991 | args = Fcons (Fcons (Fcons (definition, noindirect), | 1988 | args = Fcons (Fcons (Fcons (definition, noindirect), |
| 1992 | Fcons (keymap, Qnil)), | 1989 | Fcons (keymap, Qnil)), |
| 1993 | Fcons (Fcons (this, last), | 1990 | Fcons (Fcons (this, last), |