diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2008-10-05 18:22:21 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2008-10-05 18:22:21 (GMT) |
commit | 501d0b1523e4a2b370c58cd262bbed99725a5ab1 (patch) | |
tree | 57b5f8cd5ff8ef866da62495bc435946f4655c50 /generic/tkEntry.c | |
parent | 291d618cfb6ad5e935244599abbf1bdb93a284fc (diff) | |
download | tk-501d0b1523e4a2b370c58cd262bbed99725a5ab1.zip tk-501d0b1523e4a2b370c58cd262bbed99725a5ab1.tar.gz tk-501d0b1523e4a2b370c58cd262bbed99725a5ab1.tar.bz2 |
Greatly clean up Tk's handling of the writability of the Tcl result object.
Diffstat (limited to 'generic/tkEntry.c')
-rw-r--r-- | generic/tkEntry.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c index fa0c07e..97f64f2 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkEntry.c,v 1.50 2008/10/03 13:13:31 dkf Exp $ + * RCS: @(#) $Id: tkEntry.c,v 1.51 2008/10/05 18:22:21 dkf Exp $ */ #include "tkInt.h" @@ -691,7 +691,7 @@ EntryWidgetObjCmd( Tcl_WrongNumArgs(interp, 2, objv, NULL); goto error; } - Tcl_SetStringObj(Tcl_GetObjResult(interp), entryPtr->string, -1); + Tcl_SetObjResult(interp, Tcl_NewStringObj(entryPtr->string, -1)); break; case COMMAND_ICURSOR: @@ -3738,8 +3738,7 @@ SpinboxWidgetObjCmd( Tcl_WrongNumArgs(interp, 2, objv, NULL); goto error; } - /* FIXME: modification of objresult */ - Tcl_SetStringObj(Tcl_GetObjResult(interp), entryPtr->string, -1); + Tcl_SetObjResult(interp, Tcl_NewStringObj(entryPtr->string, -1)); break; case SB_CMD_ICURSOR: @@ -3767,9 +3766,8 @@ SpinboxWidgetObjCmd( } elem = GetSpinboxElement(sbPtr, x, y); if (elem != SEL_NONE) { - /* FIXME: modification of objresult */ - Tcl_SetStringObj(Tcl_GetObjResult(interp), - selElementNames[elem], -1); + Tcl_SetObjResult(interp, + Tcl_NewStringObj(selElementNames[elem], -1)); } break; } @@ -3990,9 +3988,8 @@ SpinboxWidgetObjCmd( goto error; } if (objc == 3) { - /* FIXME: modification of objresult */ - Tcl_SetStringObj(Tcl_GetObjResult(interp), - selElementNames[sbPtr->selElement], -1); + Tcl_SetObjResult(interp, Tcl_NewStringObj( + selElementNames[sbPtr->selElement], -1)); } else { int lastElement = sbPtr->selElement; @@ -4018,8 +4015,7 @@ SpinboxWidgetObjCmd( if (objc == 3) { EntryValueChanged(entryPtr, Tcl_GetString(objv[2])); } - /* FIXME: modification of objresult */ - Tcl_SetStringObj(Tcl_GetObjResult(interp), entryPtr->string, -1); + Tcl_SetObjResult(interp, Tcl_NewStringObj(entryPtr->string, -1)); break; case SB_CMD_VALIDATE: { |