From 24ee97634d3480b3a441c2d8e7029547572891be Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 18 May 2004 19:53:08 +0000 Subject: [PATCH] (add_menu_item, w32_menu_display_help) [USE_LISP_UNION_TYPE]: Cast from Lisp_Object using i member. --- src/w32menu.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/w32menu.c b/src/w32menu.c index 5f8f8a4e5e0..cc0932d7bf5 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -2225,9 +2225,12 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) /* 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 @@ w32_menu_display_help (HWND owner, HMENU menu, UINT item, UINT flags) 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 -- 2.39.5