diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-05-13 12:59:04 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-05-13 12:59:04 (GMT) |
commit | 81bf158695e5ecff209636d52392ca7f21675f23 (patch) | |
tree | 6e35a78f3d83e2cb85b57d1401aaf89989c6ff3d /generic/tclTrace.c | |
parent | 2aee97bf214b4578d446e48cc0a67321d06cf62b (diff) | |
download | tcl-81bf158695e5ecff209636d52392ca7f21675f23.zip tcl-81bf158695e5ecff209636d52392ca7f21675f23.tar.gz tcl-81bf158695e5ecff209636d52392ca7f21675f23.tar.bz2 |
TIP#143 implementation; still needs docs and more tests...
Diffstat (limited to 'generic/tclTrace.c')
-rw-r--r-- | generic/tclTrace.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/generic/tclTrace.c b/generic/tclTrace.c index 66b9760..0e34ab6 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.9 2004/03/01 17:33:45 dgp Exp $ + * RCS: @(#) $Id: tclTrace.c,v 1.10 2004/05/13 12:59:23 dkf Exp $ */ #include "tclInt.h" @@ -1295,7 +1295,8 @@ TraceCommandProc(clientData, interp, oldName, newName, flags) tcmdPtr->refCount++; - if ((tcmdPtr->flags & flags) && !(flags & TCL_INTERP_DESTROYED)) { + if ((tcmdPtr->flags & flags) && !(flags & TCL_INTERP_DESTROYED) + && !Tcl_LimitExceeded(interp)) { /* * Generate a command to execute by appending list elements * for the old and new command name and the operation. @@ -1333,6 +1334,7 @@ TraceCommandProc(clientData, interp, oldName, newName, flags) Tcl_DStringLength(&cmd), 0); if (code != TCL_OK) { /* We ignore errors in these traced commands */ + /*** QUESTION: Use Tcl_BackgroundError(interp); instead? ***/ } Tcl_RestoreResult(interp, &state); @@ -1728,7 +1730,7 @@ TraceExecutionProc(ClientData clientData, Tcl_Interp *interp, return traceCode; } - if (!(flags & TCL_INTERP_DESTROYED)) { + if (!(flags & TCL_INTERP_DESTROYED) && !Tcl_LimitExceeded(interp)) { /* * Check whether the current call is going to eval arbitrary * Tcl code with a generated trace, or whether we are only @@ -1938,7 +1940,8 @@ TraceVarProc(clientData, interp, name1, name2, flags) Tcl_Preserve((ClientData) tvarPtr); result = NULL; - if ((tvarPtr->flags & flags) && !(flags & TCL_INTERP_DESTROYED)) { + if ((tvarPtr->flags & flags) && !(flags & TCL_INTERP_DESTROYED) + && !Tcl_LimitExceeded(interp)) { if (tvarPtr->length != (size_t) 0) { /* * Generate a command to execute by appending list elements |