summaryrefslogtreecommitdiffstats
path: root/generic/tclHistory.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-04-10 14:47:06 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-04-10 14:47:06 (GMT)
commit0379fe02395721d2ea1419c61ca69ec818561082 (patch)
treee12acd4bb445070087067812722f564f29218f8d /generic/tclHistory.c
parentf7f181d5456b19b4726f71223362bf82d761d8ff (diff)
downloadtcl-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/tclHistory.c')
-rw-r--r--generic/tclHistory.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclHistory.c b/generic/tclHistory.c
index e77b230..87e6c52 100644
--- a/generic/tclHistory.c
+++ b/generic/tclHistory.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: tclHistory.c,v 1.9 2006/09/30 17:56:47 msofer Exp $
+ * RCS: @(#) $Id: tclHistory.c,v 1.10 2007/04/10 14:47:15 dkf Exp $
*/
#include "tclInt.h"
@@ -134,8 +134,8 @@ Tcl_RecordAndEvalObj(
* Do recording by eval'ing a tcl history command: history add $cmd.
*/
- list[0] = Tcl_NewStringObj("history", -1);
- list[1] = Tcl_NewStringObj("add", -1);
+ TclNewLiteralStringObj(list[0], "history");
+ TclNewLiteralStringObj(list[1], "add");
list[2] = cmdPtr;
objPtr = Tcl_NewListObj(3, list);