summaryrefslogtreecommitdiffstats
path: root/generic/tclConfig.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/tclConfig.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/tclConfig.c')
-rw-r--r--generic/tclConfig.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclConfig.c b/generic/tclConfig.c
index 85975f9..1199e81 100644
--- a/generic/tclConfig.c
+++ b/generic/tclConfig.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclConfig.c,v 1.13 2007/04/01 00:10:23 dkf Exp $
+ * RCS: @(#) $Id: tclConfig.c,v 1.14 2007/04/10 14:47:10 dkf Exp $
*/
#include "tclInt.h"
@@ -217,7 +217,7 @@ QueryConfigObjCmd(
* present.
*/
- Tcl_SetObjResult(interp, Tcl_NewStringObj("package not known", -1));
+ Tcl_SetResult(interp, "package not known", TCL_STATIC);
return TCL_ERROR;
}
@@ -230,7 +230,7 @@ QueryConfigObjCmd(
if (Tcl_DictObjGet(interp, pkgDict, objv [2], &val) != TCL_OK
|| val == NULL) {
- Tcl_SetObjResult(interp, Tcl_NewStringObj("key not known", -1));
+ Tcl_SetResult(interp, "key not known", TCL_STATIC);
return TCL_ERROR;
}
@@ -247,8 +247,8 @@ QueryConfigObjCmd(
listPtr = Tcl_NewListObj(n, NULL);
if (!listPtr) {
- Tcl_SetObjResult(interp,
- Tcl_NewStringObj("insufficient memory to create list",-1));
+ Tcl_SetResult(interp, "insufficient memory to create list",
+ TCL_STATIC);
return TCL_ERROR;
}