summaryrefslogtreecommitdiffstats
path: root/generic/tclEnv.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/tclEnv.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/tclEnv.c')
-rw-r--r--generic/tclEnv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclEnv.c b/generic/tclEnv.c
index e55d59e..596e68b 100644
--- a/generic/tclEnv.c
+++ b/generic/tclEnv.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: tclEnv.c,v 1.31 2007/03/21 14:16:08 dkf Exp $
+ * RCS: @(#) $Id: tclEnv.c,v 1.32 2007/04/10 14:47:13 dkf Exp $
*/
#include "tclInt.h"
@@ -118,7 +118,7 @@ TclSetupEnv(
if (environ[0] == NULL) {
Tcl_Obj *varNamePtr;
- varNamePtr = Tcl_NewStringObj("env", -1);
+ TclNewLiteralStringObj(varNamePtr, "env");
Tcl_IncrRefCount(varNamePtr);
TclArraySet(interp, varNamePtr, NULL);
Tcl_DecrRefCount(varNamePtr);