diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-04-10 14:47:06 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-04-10 14:47:06 (GMT) |
commit | 0379fe02395721d2ea1419c61ca69ec818561082 (patch) | |
tree | e12acd4bb445070087067812722f564f29218f8d /generic/tclCmdMZ.c | |
parent | f7f181d5456b19b4726f71223362bf82d761d8ff (diff) | |
download | tcl-0379fe02395721d2ea1419c61ca69ec818561082.zip tcl-0379fe02395721d2ea1419c61ca69ec818561082.tar.gz tcl-0379fe02395721d2ea1419c61ca69ec818561082.tar.bz2 |
Handle creation of Tcl_Objs from constant strings better (easier to use, more
efficient). After [Patch 1529526] (afredd)
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r-- | generic/tclCmdMZ.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 67659c1..640f43f 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.147 2007/03/30 15:54:17 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.148 2007/04/10 14:47:09 dkf Exp $ */ #include "tclInt.h" @@ -3109,9 +3109,9 @@ Tcl_TimeObjCmd( * as such (extracting the first element, typically). */ - objs[1] = Tcl_NewStringObj("microseconds", -1); - objs[2] = Tcl_NewStringObj("per", -1); - objs[3] = Tcl_NewStringObj("iteration", -1); + TclNewLiteralStringObj(objs[1], "microseconds"); + TclNewLiteralStringObj(objs[2], "per"); + TclNewLiteralStringObj(objs[3], "iteration"); Tcl_SetObjResult(interp, Tcl_NewListObj(4, objs)); return TCL_OK; |