Mercurial > emacs
comparison src/xmenu.c @ 85248:a2daf11c89b5
(grow_menu_items): Use larger_vector.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 13 Oct 2007 12:10:07 +0000 |
parents | d72878ffabae |
children | 107ccd98fa12 a0e466c4d599 |
comparison
equal
deleted
inserted
replaced
85247:205db480c6db | 85248:a2daf11c89b5 |
---|---|
352 /* Make the menu_items vector twice as large. */ | 352 /* Make the menu_items vector twice as large. */ |
353 | 353 |
354 static void | 354 static void |
355 grow_menu_items () | 355 grow_menu_items () |
356 { | 356 { |
357 Lisp_Object old; | |
358 int old_size = menu_items_allocated; | |
359 old = menu_items; | |
360 | |
361 menu_items_allocated *= 2; | 357 menu_items_allocated *= 2; |
362 | 358 menu_items = larger_vector (menu_items, menu_items_allocated, Qnil); |
363 menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil); | |
364 bcopy (XVECTOR (old)->contents, XVECTOR (menu_items)->contents, | |
365 old_size * sizeof (Lisp_Object)); | |
366 } | 359 } |
367 | 360 |
368 /* Begin a submenu. */ | 361 /* Begin a submenu. */ |
369 | 362 |
370 static void | 363 static void |