diff options
| author | Eli Zaretskii | 2007-10-13 12:11:14 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2007-10-13 12:11:14 +0000 |
| commit | 71d00ce4ae4b180c784879beaff9bafd81c29989 (patch) | |
| tree | cca3282c3498c059918f2b64ea4bcbe437a75692 /src/macmenu.c | |
| parent | 6bf377e264d675fa1bc509b58c8f6a22f75b61d1 (diff) | |
| download | emacs-71d00ce4ae4b180c784879beaff9bafd81c29989.tar.gz emacs-71d00ce4ae4b180c784879beaff9bafd81c29989.zip | |
(grow_menu_items): Use larger_vector.
Diffstat (limited to 'src/macmenu.c')
| -rw-r--r-- | src/macmenu.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/macmenu.c b/src/macmenu.c index 8305c89ee68..aa0be0bdc2e 100644 --- a/src/macmenu.c +++ b/src/macmenu.c | |||
| @@ -347,15 +347,8 @@ save_menu_items () | |||
| 347 | static void | 347 | static void |
| 348 | grow_menu_items () | 348 | grow_menu_items () |
| 349 | { | 349 | { |
| 350 | Lisp_Object old; | ||
| 351 | int old_size = menu_items_allocated; | ||
| 352 | old = menu_items; | ||
| 353 | |||
| 354 | menu_items_allocated *= 2; | 350 | menu_items_allocated *= 2; |
| 355 | 351 | menu_items = larger_vector (menu_items, menu_items_allocated, Qnil); | |
| 356 | menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil); | ||
| 357 | bcopy (XVECTOR (old)->contents, XVECTOR (menu_items)->contents, | ||
| 358 | old_size * sizeof (Lisp_Object)); | ||
| 359 | } | 352 | } |
| 360 | 353 | ||
| 361 | /* Begin a submenu. */ | 354 | /* Begin a submenu. */ |