Commit 71d00ce4 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(grow_menu_items): Use larger_vector.

parent 6bf377e2
2007-10-05 Dmitry Antipov <dmantipov@yandex.ru>
* buffer.c (add_overlay_mod_hooklist):
* ccl.c (Fregister_ccl_program, Fregister_code_conversion_map):
* fontset.c (make_fontset):
* keyboard.c (GROW_RAW_KEYBUF, menu_bar_items, menu_bar_item)
(append_tool_bar_item):
* macmenu.c (grow_menu_items):
* w32menu.c (grow_menu_items):
* xmenu.c (grow_menu_items): Use larger_vector.
2007-10-13 Eli Zaretskii <eliz@gnu.org>
* msdos.c (dos_rawgetc): Undo last change (there's no ``leaving
......
......@@ -347,15 +347,8 @@ save_menu_items ()
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. */
......
......@@ -318,14 +318,8 @@ discard_menu_items ()
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. */
......
......@@ -354,15 +354,8 @@ save_menu_items ()
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. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment