diff src/menubar.c @ 269:b2472a1930f2 r20-5b33

Import from CVS: tag r20-5b33
author cvs
date Mon, 13 Aug 2007 10:27:19 +0200
parents 405dd6d1825b
children c5d627a313b1
line wrap: on
line diff
--- a/src/menubar.c	Mon Aug 13 10:26:31 2007 +0200
+++ b/src/menubar.c	Mon Aug 13 10:27:19 2007 +0200
@@ -151,23 +151,11 @@
        (desc, path))
 {
   Lisp_Object path_entry, submenu_desc, submenu;
-  Lisp_Object *gui_item_array;
   struct gcpro gcpro1;
   struct gui_item gui_item;
 
   gui_item_init (&gui_item);
-
-  /*
-   * gui_item is a struct containing a bunch of Lisp_Object
-   * members.  We need to GC-protect all the member slots.
-   * Rather than build a long chain of individual gcpro structs
-   * that protect the slots individually, we protect all the
-   * member slots by pretending the struct is an array.  ANSI C
-   * requires tihs hack to work, ugly though it is.
-   */
-  gui_item_array = (Lisp_Object *) &gui_item;
-  GCPRO1 (gui_item_array[0]);
-  gcpro1.nvars = GUI_ITEM_GCPRO_COUNT;
+  GCPRO_GUI_ITEM (&gui_item);
   
   EXTERNAL_LIST_LOOP (path_entry, path)
     {