changeset 85247:205db480c6db

(grow_menu_items): Use larger_vector.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 13 Oct 2007 12:09:48 +0000
parents ef39b2bc8f1e
children a2daf11c89b5
files src/w32menu.c
diffstat 1 files changed, 1 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32menu.c	Sat Oct 13 12:09:22 2007 +0000
+++ b/src/w32menu.c	Sat Oct 13 12:09:48 2007 +0000
@@ -318,14 +318,8 @@
 static void
 grow_menu_items ()
 {
-  Lisp_Object old;
-  int old_size = menu_items_allocated;
-  old = menu_items;
-
   menu_items_allocated *= 2;
-  menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil);
-  bcopy (XVECTOR (old)->contents, XVECTOR (menu_items)->contents,
-	 old_size * sizeof (Lisp_Object));
+  menu_items = larger_vector (menu_items, menu_items_allocated, Qnil);
 }
 
 /* Begin a submenu.  */