summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2002-07-16 01:12:50 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2002-07-16 01:12:50 (GMT)
commit21279353f6faf15bd0abb0385ee57b65e7bb2d20 (patch)
treed453d4e45a3c71785b722da2525ca363eb49b184 /generic/tclExecute.c
parent238c1dc36a4a340625f96ed76c46bd93872562ac (diff)
downloadtcl-21279353f6faf15bd0abb0385ee57b65e7bb2d20.zip
tcl-21279353f6faf15bd0abb0385ee57b65e7bb2d20.tar.gz
tcl-21279353f6faf15bd0abb0385ee57b65e7bb2d20.tar.bz2
using the new variable name caching possibilities when setting error
results in (Tcl_AddObjErrorInfo) and (TclUpdateReturnInfo)
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 1375b20..024509e 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.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: tclExecute.c,v 1.76 2002/07/10 08:25:59 dkf Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.77 2002/07/16 01:12:50 msofer Exp $
*/
#include "tclInt.h"
@@ -514,6 +514,12 @@ TclCreateExecEnv(interp)
eePtr->stackTop = -1;
eePtr->stackEnd = (TCL_STACK_INITIAL_SIZE - 1);
+ eePtr->errorInfo = Tcl_NewStringObj("::errorInfo", -1);
+ Tcl_IncrRefCount(eePtr->errorInfo);
+
+ eePtr->errorCode = Tcl_NewStringObj("::errorCode", -1);
+ Tcl_IncrRefCount(eePtr->errorCode);
+
Tcl_MutexLock(&execMutex);
if (!execInitialized) {
TclInitAuxDataTypeTable();
@@ -548,6 +554,8 @@ TclDeleteExecEnv(eePtr)
ExecEnv *eePtr; /* Execution environment to free. */
{
Tcl_EventuallyFree((ClientData)eePtr->stackPtr, TCL_DYNAMIC);
+ TclDecrRefCount(eePtr->errorInfo);
+ TclDecrRefCount(eePtr->errorCode);
ckfree((char *) eePtr);
}