summaryrefslogtreecommitdiffstats
path: root/generic/tkMenubutton.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-11-08 22:52:29 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-11-08 22:52:29 (GMT)
commit6bb91a5313a57dceb34e2cd3764971af61368408 (patch)
tree307fda8121ab3396f4464ecccf7f5167defc07dd /generic/tkMenubutton.c
parentb2576f90de3e5a4860a8c5d13b864ee10225f5d6 (diff)
downloadtk-6bb91a5313a57dceb34e2cd3764971af61368408.zip
tk-6bb91a5313a57dceb34e2cd3764971af61368408.tar.gz
tk-6bb91a5313a57dceb34e2cd3764971af61368408.tar.bz2
More small changes to use C89 better and manage the result more efficiently.
Diffstat (limited to 'generic/tkMenubutton.c')
-rw-r--r--generic/tkMenubutton.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c
index dc8ac61..e2c5038 100644
--- a/generic/tkMenubutton.c
+++ b/generic/tkMenubutton.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMenubutton.c,v 1.23 2008/10/17 23:18:37 nijtmans Exp $
+ * RCS: @(#) $Id: tkMenubutton.c,v 1.24 2008/11/08 22:52:29 dkf Exp $
*/
#include "tkInt.h"
@@ -308,7 +308,7 @@ Tk_MenubuttonObjCmd(
return TCL_ERROR;
}
- Tcl_SetObjResult(interp, Tcl_NewStringObj(Tk_PathName(mbPtr->tkwin), -1));
+ Tcl_SetObjResult(interp, TkNewWindowObj(mbPtr->tkwin));
return TCL_OK;
}
@@ -363,9 +363,8 @@ MenuButtonWidgetObjCmd(
mbPtr->optionTable, objv[2], mbPtr->tkwin);
if (objPtr == NULL) {
goto error;
- } else {
- Tcl_SetObjResult(interp, objPtr);
}
+ Tcl_SetObjResult(interp, objPtr);
break;
case COMMAND_CONFIGURE:
@@ -375,9 +374,8 @@ MenuButtonWidgetObjCmd(
mbPtr->tkwin);
if (objPtr == NULL) {
goto error;
- } else {
- Tcl_SetObjResult(interp, objPtr);
}
+ Tcl_SetObjResult(interp, objPtr);
} else {
result = ConfigureMenuButton(interp, mbPtr, objc-2, objv+2);
}