Mercurial > emacs
comparison src/w32menu.c @ 85247:205db480c6db
(grow_menu_items): Use larger_vector.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 13 Oct 2007 12:09:48 +0000 |
parents | 65663fcd2caa |
children | f7d19cfed7da a0e466c4d599 |
comparison
equal
deleted
inserted
replaced
85246:ef39b2bc8f1e | 85247:205db480c6db |
---|---|
316 /* Make the menu_items vector twice as large. */ | 316 /* Make the menu_items vector twice as large. */ |
317 | 317 |
318 static void | 318 static void |
319 grow_menu_items () | 319 grow_menu_items () |
320 { | 320 { |
321 Lisp_Object old; | |
322 int old_size = menu_items_allocated; | |
323 old = menu_items; | |
324 | |
325 menu_items_allocated *= 2; | 321 menu_items_allocated *= 2; |
326 menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil); | 322 menu_items = larger_vector (menu_items, menu_items_allocated, Qnil); |
327 bcopy (XVECTOR (old)->contents, XVECTOR (menu_items)->contents, | |
328 old_size * sizeof (Lisp_Object)); | |
329 } | 323 } |
330 | 324 |
331 /* Begin a submenu. */ | 325 /* Begin a submenu. */ |
332 | 326 |
333 static void | 327 static void |