diff options
author | dkf <dkf@noemail.net> | 2007-04-10 14:47:06 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2007-04-10 14:47:06 (GMT) |
commit | 807909c8786778cefc690ac7f1eb5e7fce6757c9 (patch) | |
tree | e12acd4bb445070087067812722f564f29218f8d /generic/tclCmdMZ.c | |
parent | a4830b01f6f650ea70a34c388fcee6966cdb3222 (diff) | |
download | tcl-807909c8786778cefc690ac7f1eb5e7fce6757c9.zip tcl-807909c8786778cefc690ac7f1eb5e7fce6757c9.tar.gz tcl-807909c8786778cefc690ac7f1eb5e7fce6757c9.tar.bz2 |
Handle creation of Tcl_Objs from constant strings better (easier to use, more
efficient). After [Patch 1529526] (afredd)
FossilOrigin-Name: 4d69119aadb4298f8e994440eb988c6c46396086
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; |