changeset 20076:374e09781f08

(Faccessible_keymaps): Avoid alloca for fixed-size array. (Fset_keymap_parent, Fcopy_keymap, Fwhere_is_internal): Likewise.
author Karl Heuer <kwzh@gnu.org>
date Thu, 16 Oct 1997 18:28:41 +0000
parents de449ef32afd
children 437758b7ca50
files src/keymap.c
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/keymap.c	Thu Oct 16 18:27:12 1997 +0000
+++ b/src/keymap.c	Thu Oct 16 18:28:41 1997 +0000
@@ -341,8 +341,7 @@
 
       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 @@
       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 @@
 
 	  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 @@
 	    }
 	  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),