diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2008-10-05 18:22:21 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2008-10-05 18:22:21 (GMT) |
commit | 3a010da1bb29b97436f6057b1a4d644d8d9dc3f7 (patch) | |
tree | 57b5f8cd5ff8ef866da62495bc435946f4655c50 /generic/tkMenu.c | |
parent | 1f14c35a9cfdd960b4455d84d2d46d7ecad5e44f (diff) | |
download | tk-3a010da1bb29b97436f6057b1a4d644d8d9dc3f7.zip tk-3a010da1bb29b97436f6057b1a4d644d8d9dc3f7.tar.gz tk-3a010da1bb29b97436f6057b1a4d644d8d9dc3f7.tar.bz2 |
Greatly clean up Tk's handling of the writability of the Tcl result object.
Diffstat (limited to 'generic/tkMenu.c')
-rw-r--r-- | generic/tkMenu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 650f5d0..fb04861 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.43 2008/07/23 23:24:23 nijtmans Exp $ + * RCS: @(#) $Id: tkMenu.c,v 1.44 2008/10/05 18:22:21 dkf Exp $ */ /* @@ -871,7 +871,7 @@ MenuWidgetObjCmd( if (index < 0) { Tcl_SetResult(interp, "none", TCL_STATIC); } else { - Tcl_SetIntObj(Tcl_GetObjResult(interp), index); + Tcl_SetObjResult(interp, Tcl_NewIntObj(index)); } break; } @@ -959,8 +959,8 @@ MenuWidgetObjCmd( if (menuPtr->entries[index]->type == TEAROFF_ENTRY) { Tcl_SetResult(interp, "tearoff", TCL_STATIC); } else { - Tcl_SetStringObj(Tcl_GetObjResult(interp), - menuEntryTypeStrings[menuPtr->entries[index]->type], -1); + Tcl_SetObjResult(interp, Tcl_NewStringObj( + menuEntryTypeStrings[menuPtr->entries[index]->type], -1)); } break; } |