summaryrefslogtreecommitdiffstats
path: root/generic/tkMenu.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-01-17 05:13:11 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-01-17 05:13:11 (GMT)
commite18b826ed756e177fc0e6f96fed210bf26bcb8b7 (patch)
treea64645a35b960e288a19b038e87f81a9248f5709 /generic/tkMenu.c
parente2d6df79c697064b173e14f29a157733ad3a9a6f (diff)
downloadtk-e18b826ed756e177fc0e6f96fed210bf26bcb8b7.zip
tk-e18b826ed756e177fc0e6f96fed210bf26bcb8b7.tar.gz
tk-e18b826ed756e177fc0e6f96fed210bf26bcb8b7.tar.bz2
* Updates to handle change in type of tablePtr
argument of Tcl_GetIndexFromObj(Struct) from (char **) to (CONST char **). [TIP 27] [Patch 504705]
Diffstat (limited to 'generic/tkMenu.c')
-rw-r--r--generic/tkMenu.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index ff50130..ff45455 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMenu.c,v 1.13 2001/10/12 13:30:31 tmh Exp $
+ * RCS: @(#) $Id: tkMenu.c,v 1.14 2002/01/17 05:13:11 dgp Exp $
*/
/*
@@ -105,8 +105,10 @@ TCL_DECLARE_MUTEX(menuMutex)
char *tkMenuStateStrings[] = {"active", "normal", "disabled", (char *) NULL};
-static char *menuEntryTypeStrings[] = {"cascade", "checkbutton", "command",
- "radiobutton", "separator", (char *) NULL};
+static CONST char *menuEntryTypeStrings[] = {
+ "cascade", "checkbutton", "command", "radiobutton", "separator",
+ (char *) NULL
+};
/*
* The following table defines the legal values for the -compound option.
@@ -243,7 +245,7 @@ static Tk_OptionSpec *specsArray[] = {
* Menu type strings for use with Tcl_GetIndexFromObj.
*/
-static char *menuTypeStrings[] = {"normal", "tearoff", "menubar",
+static CONST char *menuTypeStrings[] = {"normal", "tearoff", "menubar",
(char *) NULL};
Tk_OptionSpec tkMenuConfigSpecs[] = {
@@ -311,7 +313,7 @@ Tk_OptionSpec tkMenuConfigSpecs[] = {
* along with MenuWidgetObjCmd.
*/
-static char *menuOptions[] = {
+static CONST char *menuOptions[] = {
"activate", "add", "cget", "clone", "configure", "delete", "entrycget",
"entryconfigure", "index", "insert", "invoke", "post", "postcascade",
"type", "unpost", "yposition", (char *) NULL
@@ -463,7 +465,7 @@ MenuCmd(clientData, interp, objc, objv)
int i, index;
int toplevel;
char *windowName;
- static char *typeStringList[] = {"-type", (char *) NULL};
+ static CONST char *typeStringList[] = {"-type", (char *) NULL};
TkMenuOptionTables *optionTablesPtr = (TkMenuOptionTables *) clientData;
if (objc < 2) {
@@ -1012,9 +1014,9 @@ MenuWidgetObjCmd(clientData, interp, objc, objv)
if (menuPtr->entries[index]->type == TEAROFF_ENTRY) {
Tcl_SetResult(interp, "tearoff", TCL_STATIC);
} else {
- Tcl_SetResult(interp,
+ Tcl_SetStringObj(Tcl_GetObjResult(interp),
menuEntryTypeStrings[menuPtr->entries[index]->type],
- TCL_STATIC);
+ -1);
}
break;
}