diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-06-19 14:48:44 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-06-19 14:48:44 (GMT) |
commit | 435deb263d3876aa9dcca43472efdca252b6fe98 (patch) | |
tree | 1dc95714bb6dc1cd3fff23b6d89ef7e2723fca6a /generic/tkMenu.c | |
parent | b787fb229d2e4874fdad8cb9c6bf792ae35f8f24 (diff) | |
download | tk-435deb263d3876aa9dcca43472efdca252b6fe98.zip tk-435deb263d3876aa9dcca43472efdca252b6fe98.tar.gz tk-435deb263d3876aa9dcca43472efdca252b6fe98.tar.bz2 |
Handle different possible form of "none" better.
Diffstat (limited to 'generic/tkMenu.c')
-rw-r--r-- | generic/tkMenu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 5ee9ede..91eb87d 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -161,7 +161,7 @@ static const Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = { TCL_INDEX_NONE, offsetof(TkMenuEntry, state), 0, (ClientData) menuStateStrings, 0}, {TK_OPTION_INDEX, "-underline", NULL, NULL, - DEF_MENU_ENTRY_UNDERLINE, TCL_INDEX_NONE, offsetof(TkMenuEntry, underline), 0, NULL, 0}, + DEF_MENU_ENTRY_UNDERLINE, TCL_INDEX_NONE, offsetof(TkMenuEntry, underline), TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_END, NULL, NULL, NULL, 0, 0, 0, 0, NULL, 0} }; @@ -844,7 +844,7 @@ MenuWidgetObjCmd( goto error; } if (index == TCL_INDEX_NONE) { - Tcl_SetObjResult(interp, Tcl_NewStringObj("none", -1)); + Tcl_SetObjResult(interp, Tcl_NewObj()); } else { Tcl_SetObjResult(interp, Tcl_NewWideIntObj(index)); } |