summaryrefslogtreecommitdiffstats
path: root/generic/tclResult.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/tclResult.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/tclResult.c')
-rw-r--r--generic/tclResult.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/generic/tclResult.c b/generic/tclResult.c
index 1d56e6f..c159fce 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclResult.c,v 1.33 2007/01/29 18:55:50 dgp Exp $
+ * RCS: @(#) $Id: tclResult.c,v 1.34 2007/04/10 14:47:17 dkf Exp $
*/
#include "tclInt.h"
@@ -1112,12 +1112,12 @@ GetKeys(void)
int i;
- keys[KEY_CODE] = Tcl_NewStringObj("-code", -1);
- keys[KEY_ERRORCODE] = Tcl_NewStringObj("-errorcode", -1);
- keys[KEY_ERRORINFO] = Tcl_NewStringObj("-errorinfo", -1);
- keys[KEY_ERRORLINE] = Tcl_NewStringObj("-errorline", -1);
- keys[KEY_LEVEL] = Tcl_NewStringObj("-level", -1);
- keys[KEY_OPTIONS] = Tcl_NewStringObj("-options", -1);
+ TclNewLiteralStringObj(keys[KEY_CODE], "-code");
+ TclNewLiteralStringObj(keys[KEY_ERRORCODE], "-errorcode");
+ TclNewLiteralStringObj(keys[KEY_ERRORINFO], "-errorinfo");
+ TclNewLiteralStringObj(keys[KEY_ERRORLINE], "-errorline");
+ TclNewLiteralStringObj(keys[KEY_LEVEL], "-level");
+ TclNewLiteralStringObj(keys[KEY_OPTIONS], "-options");
for (i = KEY_CODE; i < KEY_LAST; i++) {
Tcl_IncrRefCount(keys[i]);