diff src/nsmenu.m @ 112434:9de5a68b57e1

Promote SSDATA macro from gtkutil.c and xsmfns.c to lisp.h.
author Paul Eggert <eggert@cs.ucla.edu>
date Sat, 22 Jan 2011 18:56:06 -0800
parents 7935463f385e
children
line wrap: on
line diff
--- a/src/nsmenu.m	Sat Jan 22 17:09:09 2011 -0800
+++ b/src/nsmenu.m	Sat Jan 22 18:56:06 2011 -0800
@@ -355,7 +355,7 @@
 /*           if (submenu && strcmp (submenuTitle, SDATA (string)))
                continue; */
 
-	  wv->name = (char *) SDATA (string);
+	  wv->name = SSDATA (string);
           update_submenu_strings (wv->contents);
 	  wv = wv->next;
 	}
@@ -444,7 +444,7 @@
             strncpy (previous_strings[i/4], SDATA (string), 10);
 
 	  wv = xmalloc_widget_value ();
-	  wv->name = (char *) SDATA (string);
+	  wv->name = SSDATA (string);
 	  wv->value = 0;
 	  wv->enabled = 1;
 	  wv->button_type = BUTTON_TYPE_NONE;
@@ -833,7 +833,7 @@
 	    }
 #endif
 	  pane_string = (NILP (pane_name)
-			 ? "" : (char *) SDATA (pane_name));
+			 ? "" : SSDATA (pane_name));
 	  /* If there is just one top-level pane, put all its items directly
 	     under the top-level menu.  */
 	  if (menu_items_n_panes == 1)
@@ -898,9 +898,9 @@
 	    prev_wv->next = wv;
 	  else
 	    save_wv->contents = wv;
-	  wv->name = (char *) SDATA (item_name);
+	  wv->name = SSDATA (item_name);
 	  if (!NILP (descrip))
-	    wv->key = (char *) SDATA (descrip);
+	    wv->key = SSDATA (descrip);
 	  wv->value = 0;
 	  /* If this item has a null value,
 	     make the call_data null so that it won't display a box
@@ -949,7 +949,7 @@
 	title = ENCODE_MENU_STRING (title);
 #endif
 
-      wv_title->name = (char *) SDATA (title);
+      wv_title->name = SSDATA (title);
       wv_title->enabled = NO;
       wv_title->button_type = BUTTON_TYPE_NONE;
       wv_title->help = Qnil;
@@ -1036,7 +1036,7 @@
       helpObj = TOOLPROP (TOOL_BAR_ITEM_HELP);
       if (NILP (helpObj))
         helpObj = TOOLPROP (TOOL_BAR_ITEM_CAPTION);
-      helpText = NILP (helpObj) ? "" : (char *)SDATA (helpObj);
+      helpText = NILP (helpObj) ? "" : SSDATA (helpObj);
 
       /* Ignore invalid image specifications.  */
       if (!valid_image_p (image))