diff options
author | dgp <dgp@users.sourceforge.net> | 2004-10-15 04:01:22 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2004-10-15 04:01:22 (GMT) |
commit | 0eb70513827981212a928f0a5b63afb70c53c960 (patch) | |
tree | a5072bb17646340c040c80672eeba059e8b393f0 /generic/tclInt.h | |
parent | 2b7d6e025eefe41b48ec7f948602faf2d3bf7055 (diff) | |
download | tcl-0eb70513827981212a928f0a5b63afb70c53c960.zip tcl-0eb70513827981212a928f0a5b63afb70c53c960.tar.gz tcl-0eb70513827981212a928f0a5b63afb70c53c960.tar.bz2 |
* generic/tclBasic.c (Tcl_CreateInterp,Tcl_DeleteInterp,
TclEvalObjvInternal,Tcl_LogCommandInfo,TclAddObjErrorInfo):
* generic/tclCmdAH.c (Tcl_CatchObjCmd):
* generic/tclEvent.c (BgError,ErrAssocData,Tcl_BackgroundError,
HandleBgErrors,BgErrorDeleteProc):
* generic/tclExecute.c (TclCreateExecEnv,TclDeleteExecEnv):
* generic/tclIOUtil.c (comments only):
* generic/tclInt.h (ExecEnv,Interp, ERR_IN_PROGRESS):
* generic/tclInterp.c ([tclInit]):
* generic/tclMain.c (comments only):
* generic/tclNamesp.c
(Tcl_CreateNamespace,Tcl_DeleteNamespace,TclTeardownNamespace):
* generic/tclProc.c (TclUpdateReturnInfo):
* generic/tclResult.c
(Tcl_ResetResult,TclTransferResult):
* generic/tclTrace.c (CallVarTraces):
Reworked management of the "errorInfo" data of an interp.
That information is now primarily stored in a new private
(Tcl_Obj *) field of the Interp struct, rather than using a
global variable ::errorInfo as the primary storage. The
ERR_IN_PROGRESS flag bit value is no longer required to manage
the value in its new location, and is removed. Variable traces
are established to support compatibility for any code expecting
the ::errorInfo variable to hold the information.
***POTENTIAL INCOMPATIBILITY***
Code that sets traces on the ::errorInfo variable may notice a
difference in timing of the firing of those traces. Code that
uses the value ERR_IN_PROGRESS.
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index c97e727..f513b19 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.180 2004/10/05 18:14:27 dgp Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.181 2004/10/15 04:01:31 dgp Exp $ */ #ifndef _TCLINT @@ -888,8 +888,6 @@ typedef struct ExecEnv { Tcl_Obj **tosPtr; /* Points to current top of stack; * (stackPtr-1) when the stack is empty. */ Tcl_Obj **endPtr; /* Points to last usable item in stack. */ - Tcl_Obj *errorInfo; - Tcl_Obj *errorCode; } ExecEnv; /* @@ -1332,7 +1330,10 @@ typedef struct Interp { Tcl_Obj *returnLevelKey; /* holds "-level" */ Tcl_Obj *returnOptionsKey; /* holds "-options" */ + Tcl_Obj *errorInfo; /* errorInfo value (now as a Tcl_Obj) */ + Tcl_Obj *eiVar; /* cached ref to ::errorInfo variable */ Tcl_Obj *errorCode; /* errorCode value (now as a Tcl_Obj) */ + Tcl_Obj *ecVar; /* cached ref to ::errorInfo variable */ /* * Resource limiting framework support (TIP#143). @@ -1395,11 +1396,8 @@ typedef struct Interp { * don't process any more commands for it, and destroy * the structure as soon as all nested invocations of * Tcl_Eval are done. - * ERR_IN_PROGRESS: Non-zero means an error unwind is already in - * progress. Zero means a command proc has been - * invoked since last error occured. * ERR_ALREADY_LOGGED: Non-zero means information has already been logged - * in $errorInfo for the current Tcl_Eval instance, + * in iPtr->errorInfo for the current Tcl_Eval instance, * so Tcl_Eval needn't log it (used to implement the * "error message log" command). * DONT_COMPILE_CMDS_INLINE: Non-zero means that the bytecode compiler @@ -1418,7 +1416,6 @@ typedef struct Interp { */ #define DELETED 1 -#define ERR_IN_PROGRESS 2 #define ERR_ALREADY_LOGGED 4 #define DONT_COMPILE_CMDS_INLINE 0x20 #define RAND_SEED_INITIALIZED 0x40 |