summaryrefslogtreecommitdiffstats
path: root/Doc/api/exceptions.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/api/exceptions.tex')
0 files changed, 0 insertions, 0 deletions
same time as +TCL_TRACE_RESULT_OBJECT. +.TP +\fBTCL_TRACE_RESULT_OBJECT\fR +The result of invoking the \fIproc\fR is a Tcl_Obj* (cast to a char*) +with a reference count of at least one. The ownership of that +reference will be transferred to the Tcl core for release (when the +core has finished with it) via a call to \fBTcl_DecrRefCount\fR. Must +not be specified at the same time as TCL_TRACE_RESULT_DYNAMIC. +.VE 8.4 .PP Whenever one of the specified operations occurs on the variable, \fIproc\fR will be invoked. @@ -135,6 +156,11 @@ accessed is a global one not accessible from the current level of procedure call: the trace procedure will need to pass this flag back to variable-related procedures like \fBTcl_GetVar\fR if it attempts to access the variable. +The bit TCL_NAMESPACE_ONLY will be set whenever the variable being +accessed is a namespace one not accessible from the current level of +procedure call: the trace procedure will need to pass this flag +back to variable-related procedures like \fBTcl_GetVar\fR if it +attempts to access the variable. The bit TCL_TRACE_DESTROYED will be set in \fIflags\fR if the trace is about to be destroyed; this information may be useful to \fIproc\fR so that it can clean up its own internal data structures (see @@ -159,9 +185,10 @@ traces set on a given variable. The return value from \fBTcl_VarTraceInfo\fR is the \fIclientData\fR associated with a particular trace. The trace must be on the variable specified by the \fIinterp\fR, -\fIvarName\fR, and \fIflags\fR arguments (only the TCL_GLOBAL_ONLY -bit from \fIflags\fR is used; other bits are ignored) and its trace procedure -must the same as the \fIproc\fR argument. +\fIvarName\fR, and \fIflags\fR arguments (only the TCL_GLOBAL_ONLY and +TCL_NAMESPACE_ONLY bits from \fIflags\fR is used; other bits are +ignored) and its trace procedure must the same as the \fIproc\fR +argument. If the \fIprevClientData\fR argument is NULL then the return value corresponds to the first (most recently created) matching trace, or NULL if there are no matching traces. @@ -297,7 +324,14 @@ successful completion. If \fIproc\fR returns a non-NULL value it signifies that an error occurred. The return value must be a pointer to a static character string -containing an error message. +containing an error message, +.VS 8.4 +unless (\fIexactly\fR one of) the TCL_TRACE_RESULT_DYNAMIC and +TCL_TRACE_RESULT_OBJECT flags is set, which specify that the result is +either a dynamic string (to be released with \fBckfree\fR) or a +Tcl_Obj* (cast to char* and to be released with +\fBTcl_DecrRefCount\fR) containing the error message. +.VE 8.4 If a trace procedure returns an error, no further traces are invoked for the access and the traced access aborts with the given message. diff --git a/generic/tcl.h b/generic/tcl.h index cb5c9d5..f960f51 100644 --- a/generic/tcl.h +++ b/generic/tcl.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: tcl.h,v 1.104 2001/10/15 17:34:35 hobbs Exp $ + * RCS: @(#) $Id: tcl.h,v 1.105 2001/11/19 14:35:54 dkf Exp $ */ #ifndef _TCL @@ -942,6 +942,9 @@ typedef struct Tcl_DString { /* Required to support old variable/vdelete/vinfo traces */ #define TCL_TRACE_OLD_STYLE 0x1000 #endif +/* Indicate the semantics of the result of a trace */ +#define TCL_TRACE_RESULT_DYNAMIC 0x8000 +#define TCL_TRACE_RESULT_OBJECT 0x10000 /* * Flag values passed to c