aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/w32menu.c9
2 files changed, 14 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ed0ea6d3a17..e120edab056 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12012-07-21 Eli Zaretskii <eliz@gnu.org>
2
3 * w32menu.c (add_menu_item): Cast to UINT_PTR when assigning
4 info.dwItemData. Fixes crashes on 64-bit Windows. Suggested by
5 Fabrice Popineau <fabrice.popineau@supelec.fr>.
6
12012-07-21 Jan Djärv <jan.h.d@swipnet.se> 72012-07-21 Jan Djärv <jan.h.d@swipnet.se>
2 8
3 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134). 9 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
diff --git a/src/w32menu.c b/src/w32menu.c
index 24dc9d79192..a5f4c3881b5 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -1533,7 +1533,14 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item)
1533 until it is ready to be displayed, since GC can happen while 1533 until it is ready to be displayed, since GC can happen while
1534 menus are active. */ 1534 menus are active. */
1535 if (!NILP (wv->help)) 1535 if (!NILP (wv->help))
1536 info.dwItemData = (DWORD) XLI (wv->help); 1536 {
1537 /* As of Jul-2012, w32api headers say that dwItemData
1538 has DWORD type, but that's a bug: it should actually
1539 be UINT_PTR, which is correct for 32-bit and 64-bit
1540 Windows alike. MSVC headers get it right; hopefully,
1541 MinGW headers will, too. */
1542 info.dwItemData = (UINT_PTR) XLI (wv->help);
1543 }
1537 if (wv->button_type == BUTTON_TYPE_RADIO) 1544 if (wv->button_type == BUTTON_TYPE_RADIO)
1538 { 1545 {
1539 /* CheckMenuRadioItem allows us to differentiate TOGGLE and 1546 /* CheckMenuRadioItem allows us to differentiate TOGGLE and