summaryrefslogtreecommitdiffstats
path: root/generic/tclInterp.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/tclInterp.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/tclInterp.c')
-rw-r--r--generic/tclInterp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index 6e9c041..b9f445a 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInterp.c,v 1.71 2007/04/02 18:48:03 dgp Exp $
+ * RCS: @(#) $Id: tclInterp.c,v 1.72 2007/04/10 14:47:16 dkf Exp $
*/
#include "tclInt.h"
@@ -1495,7 +1495,7 @@ AliasCreate(
* on the precise definition of these tokens.
*/
- newToken = Tcl_NewStringObj("::",-1);
+ TclNewLiteralStringObj(newToken, "::");
Tcl_AppendObjToObj(newToken, aliasPtr->token);
Tcl_DecrRefCount(aliasPtr->token);
aliasPtr->token = newToken;
@@ -2191,9 +2191,10 @@ SlaveCreate(
*/
if (safe) {
- Tcl_Obj* clockObj = Tcl_NewStringObj("clock", -1);
+ Tcl_Obj *clockObj;
int status;
+ TclNewLiteralStringObj(clockObj, "clock");
Tcl_IncrRefCount(clockObj);
status = AliasCreate(interp, slaveInterp, masterInterp, clockObj,
clockObj, 0, (Tcl_Obj *CONST *) NULL);