Mercurial > emacs
changeset 11266:3e93d8b99b05
(menubar_selection_callback, dialog_selection_callback)
(single_submenu): Cast pointer to int by way of EMACS_INT.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 07 Apr 1995 19:02:49 +0000 |
parents | b2291296ec87 |
children | 01d6f40201e1 |
files | src/xmenu.c |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xmenu.c Fri Apr 07 19:00:48 1995 +0000 +++ b/src/xmenu.c Fri Apr 07 19:02:49 1995 +0000 @@ -1136,7 +1136,9 @@ else { entry = XVECTOR (vector)->contents[i + MENU_ITEMS_ITEM_VALUE]; - if ((int) client_data == i) + /* The EMACS_INT cast avoids a warning. There's no problem + as long as pointers have enough bits to hold small integers. */ + if ((int) (EMACS_INT) client_data == i) { int j; struct input_event buf; @@ -1342,7 +1344,9 @@ if (!NILP (descrip)) wv->key = (char *) XSTRING (descrip)->data; wv->value = 0; - wv->call_data = (!NILP (def) ? (void *) i : 0); + /* The EMACS_INT cast avoids a warning. There's no problem + as long as pointers have enough bits to hold small integers. */ + wv->call_data = (!NILP (def) ? (void *) (EMACS_INT) i : 0); wv->enabled = !NILP (enable); prev_wv = wv; @@ -1864,7 +1868,9 @@ LWLIB_ID id; XtPointer client_data; { - if ((int)client_data != -1) + /* The EMACS_INT cast avoids a warning. There's no problem + as long as pointers have enough bits to hold small integers. */ + if ((int) (EMACS_INT) client_data != -1) menu_item_selection = (Lisp_Object *) client_data; BLOCK_INPUT; lw_destroy_all_widgets (id);