changeset 55671:6817f9469688

(add_menu_item, w32_menu_display_help) [USE_LISP_UNION_TYPE]: Cast from Lisp_Object using i member.
author Jason Rumney <jasonr@gnu.org>
date Tue, 18 May 2004 19:53:08 +0000
parents d3274c878082
children c2e5f1d0cc84
files src/w32menu.c
diffstat 1 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32menu.c	Tue May 18 19:48:51 2004 +0000
+++ b/src/w32menu.c	Tue May 18 19:53:08 2004 +0000
@@ -2225,9 +2225,12 @@
 	  /* Set help string for menu item.  Leave it as a Lisp_Object
 	     until it is ready to be displayed, since GC can happen while
 	     menus are active.  */
-	  if (wv->help)
-	    info.dwItemData = (DWORD) wv->help;
-
+	  if (!NILP (wv->help))
+#ifdef USE_LISP_UNION_TYPE
+	    info.dwItemData = (DWORD) (wv->help).i;
+#else
+	    info.dwItemData = (DWORD) (wv->help);
+#endif
 	  if (wv->button_type == BUTTON_TYPE_RADIO)
 	    {
 	      /* CheckMenuRadioItem allows us to differentiate TOGGLE and
@@ -2307,7 +2310,12 @@
 	  info.fMask = MIIM_DATA;
 	  get_menu_item_info (menu, item, FALSE, &info);
 
+#ifdef USE_LISP_UNION_TYPE
+	  help = info.dwItemData ? (Lisp_Object) ((EMACS_INT) info.dwItemData)
+	                         : Qnil;
+#else
 	  help = info.dwItemData ? (Lisp_Object) info.dwItemData : Qnil;
+#endif
 	}
 
       /* Store the help echo in the keyboard buffer as the X toolkit