diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-04-10 14:47:06 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-04-10 14:47:06 (GMT) |
commit | 0379fe02395721d2ea1419c61ca69ec818561082 (patch) | |
tree | e12acd4bb445070087067812722f564f29218f8d /generic/tclTrace.c | |
parent | f7f181d5456b19b4726f71223362bf82d761d8ff (diff) | |
download | tcl-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/tclTrace.c')
-rw-r--r-- | generic/tclTrace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclTrace.c b/generic/tclTrace.c index 4301c8b..56a165d 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTrace.c,v 1.35 2007/04/02 18:48:04 dgp Exp $ + * RCS: @(#) $Id: tclTrace.c,v 1.36 2007/04/10 14:47:17 dkf Exp $ */ #include "tclInt.h" @@ -2612,9 +2612,9 @@ TclCallVarTraces( if (leaveErrMsg) { CONST char *type = ""; Tcl_Obj *options = Tcl_GetReturnOptions((Tcl_Interp *)iPtr, code); - Tcl_Obj *errorInfoKey = Tcl_NewStringObj("-errorinfo", -1); - Tcl_Obj *errorInfo; + Tcl_Obj *errorInfoKey, *errorInfo; + TclNewLiteralStringObj(errorInfoKey, "-errorinfo"); Tcl_IncrRefCount(errorInfoKey); Tcl_DictObjGet(NULL, options, errorInfoKey, &errorInfo); Tcl_IncrRefCount(errorInfo); |