diff options
author | nijtmans <nijtmans> | 2008-11-25 23:19:01 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2008-11-25 23:19:01 (GMT) |
commit | 00452d9d7d4d961a4659fc21e69febb307d184f0 (patch) | |
tree | 30839af6e8ba95ccd3b3546349a8e12b36608a0b /generic/tclIndexObj.c | |
parent | 27413e2e6be699ec19189b0c87894f786205deb5 (diff) | |
download | tcl-00452d9d7d4d961a4659fc21e69febb307d184f0.zip tcl-00452d9d7d4d961a4659fc21e69febb307d184f0.tar.gz tcl-00452d9d7d4d961a4659fc21e69febb307d184f0.tar.bz2 |
Eliminate 3 calls to Tcl_SetResult, as
examples how it should have been done.
purpose: contribute in the TIP #340 discussion.
Diffstat (limited to 'generic/tclIndexObj.c')
-rw-r--r-- | generic/tclIndexObj.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index f04db71..d0fb382 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.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: tclIndexObj.c,v 1.46 2008/10/14 22:37:53 nijtmans Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.47 2008/11/25 23:19:02 nijtmans Exp $ */ #include "tclInt.h" @@ -1263,7 +1263,7 @@ Tcl_ParseArgsObjv( sprintf(buf, "bad argument type %d in Tcl_ArgvInfo", infoPtr->type); - Tcl_SetResult(interp, buf, TCL_VOLATILE); + Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1)); goto error; } } |