summaryrefslogtreecommitdiffstats
path: root/generic/tclNamesp.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-09-17 10:43:58 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-09-17 10:43:58 (GMT)
commit3c73dfe8f910b0af223198e6f8196f6bc52124f6 (patch)
treed76e0f74a90f608998352567ac610785f244c7dc /generic/tclNamesp.c
parent700619fa04b8a0e355f2716eb6fe90d71303b4f9 (diff)
downloadtcl-3c73dfe8f910b0af223198e6f8196f6bc52124f6.zip
tcl-3c73dfe8f910b0af223198e6f8196f6bc52124f6.tar.gz
tcl-3c73dfe8f910b0af223198e6f8196f6bc52124f6.tar.bz2
Generate literal values more efficiently using TclNewLiteralStringObj macro.
Diffstat (limited to 'generic/tclNamesp.c')
-rw-r--r--generic/tclNamesp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 41b93d0..65a6952 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -23,7 +23,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNamesp.c,v 1.149 2007/09/09 19:28:31 dgp Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.150 2007/09/17 10:44:04 dkf Exp $
*/
#include "tclInt.h"
@@ -3026,11 +3026,11 @@ NamespaceCodeCmd(
* "namespace inscope" command.
*/
- listPtr = Tcl_NewListObj(0, NULL);
- Tcl_ListObjAppendElement(interp, listPtr,
- Tcl_NewStringObj("::namespace", -1));
- Tcl_ListObjAppendElement(interp, listPtr,
- Tcl_NewStringObj("inscope", -1));
+ TclNewObj(listPtr);
+ TclNewLiteralStringObj(objPtr, "::namespace");
+ Tcl_ListObjAppendElement(interp, listPtr, objPtr);
+ TclNewLiteralStringObj(objPtr, "inscope");
+ Tcl_ListObjAppendElement(interp, listPtr, objPtr);
currNsPtr = (Namespace *) TclGetCurrentNamespace(interp);
if (currNsPtr == (Namespace *) TclGetGlobalNamespace(interp)) {