# HG changeset patch # User Eli Zaretskii # Date 1192277362 0 # Node ID ef39b2bc8f1e0413da8889c3d230caea98ee79cd # Parent 8188d7d7f4c5db723887f871008c067947c2fb29 (grow_menu_items): Use larger_vector. diff -r 8188d7d7f4c5 -r ef39b2bc8f1e src/macmenu.c --- a/src/macmenu.c Sat Oct 13 12:08:42 2007 +0000 +++ b/src/macmenu.c Sat Oct 13 12:09:22 2007 +0000 @@ -347,15 +347,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. */