aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2004-05-18 19:53:08 +0000
committerJason Rumney2004-05-18 19:53:08 +0000
commit24ee97634d3480b3a441c2d8e7029547572891be (patch)
tree843b5ecade553beaeb42f2acbf34fba4405d51e2 /src
parent7cb010ed71e28e79bdce5e22ce6f257ca991a008 (diff)
downloademacs-24ee97634d3480b3a441c2d8e7029547572891be.tar.gz
emacs-24ee97634d3480b3a441c2d8e7029547572891be.zip
(add_menu_item, w32_menu_display_help) [USE_LISP_UNION_TYPE]: Cast
from Lisp_Object using i member.
Diffstat (limited to 'src')
-rw-r--r--src/w32menu.c14
1 files 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)
2225 /* Set help string for menu item. Leave it as a Lisp_Object 2225 /* Set help string for menu item. Leave it as a Lisp_Object
2226 until it is ready to be displayed, since GC can happen while 2226 until it is ready to be displayed, since GC can happen while
2227 menus are active. */ 2227 menus are active. */
2228 if (wv->help) 2228 if (!NILP (wv->help))
2229 info.dwItemData = (DWORD) wv->help; 2229#ifdef USE_LISP_UNION_TYPE
2230 2230 info.dwItemData = (DWORD) (wv->help).i;
2231#else
2232 info.dwItemData = (DWORD) (wv->help);
2233#endif
2231 if (wv->button_type == BUTTON_TYPE_RADIO) 2234 if (wv->button_type == BUTTON_TYPE_RADIO)
2232 { 2235 {
2233 /* CheckMenuRadioItem allows us to differentiate TOGGLE and 2236 /* CheckMenuRadioItem allows us to differentiate TOGGLE and
@@ -2307,7 +2310,12 @@ w32_menu_display_help (HWND owner, HMENU menu, UINT item, UINT flags)
2307 info.fMask = MIIM_DATA; 2310 info.fMask = MIIM_DATA;
2308 get_menu_item_info (menu, item, FALSE, &info); 2311 get_menu_item_info (menu, item, FALSE, &info);
2309 2312
2313#ifdef USE_LISP_UNION_TYPE
2314 help = info.dwItemData ? (Lisp_Object) ((EMACS_INT) info.dwItemData)
2315 : Qnil;
2316#else
2310 help = info.dwItemData ? (Lisp_Object) info.dwItemData : Qnil; 2317 help = info.dwItemData ? (Lisp_Object) info.dwItemData : Qnil;
2318#endif
2311 } 2319 }
2312 2320
2313 /* Store the help echo in the keyboard buffer as the X toolkit 2321 /* Store the help echo in the keyboard buffer as the X toolkit