diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-27 12:06:40 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-27 12:06:40 (GMT) |
commit | 8ef8edabe2bb9d9fc6364861567a343f0c9f6f2c (patch) | |
tree | 093de949b687d61c7797d802193309d8568f0a0b /generic/tclTrace.c | |
parent | ecf687e081191d5ebb3a46a54589f19e41a4d7d1 (diff) | |
parent | 47bc13b6d44edf2161eb16a0ae13020000cb8732 (diff) | |
download | tcl-8ef8edabe2bb9d9fc6364861567a343f0c9f6f2c.zip tcl-8ef8edabe2bb9d9fc6364861567a343f0c9f6f2c.tar.gz tcl-8ef8edabe2bb9d9fc6364861567a343f0c9f6f2c.tar.bz2 |
merge trunk.
Implement Tcl_VarTraceInfo and Tcl_UpVar as macro.
Diffstat (limited to 'generic/tclTrace.c')
-rw-r--r-- | generic/tclTrace.c | 44 |
1 files changed, 2 insertions, 42 deletions
diff --git a/generic/tclTrace.c b/generic/tclTrace.c index c48234f..bbbbf3c 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -155,8 +155,8 @@ typedef struct { #define FOREACH_VAR_TRACE(interp, name, clientData) \ (clientData) = NULL; \ - while (((clientData) = Tcl_VarTraceInfo((interp), (name), 0, \ - TraceVarProc, (clientData))) != NULL) + while (((clientData) = Tcl_VarTraceInfo2((interp), (name), NULL, \ + 0, TraceVarProc, (clientData))) != NULL) #define FOREACH_COMMAND_TRACE(interp, name, clientData) \ (clientData) = NULL; \ @@ -2931,46 +2931,6 @@ Tcl_UntraceVar2( /* *---------------------------------------------------------------------- * - * Tcl_VarTraceInfo -- - * - * Return the clientData value associated with a trace on a variable. - * This function can also be used to step through all of the traces on a - * particular variable that have the same trace function. - * - * Results: - * The return value is the clientData value associated with a trace on - * the given variable. Information will only be returned for a trace with - * proc as trace function. If the clientData argument is NULL then the - * first such trace is returned; otherwise, the next relevant one after - * the one given by clientData will be returned. If the variable doesn't - * exist, or if there are no (more) traces for it, then NULL is returned. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -ClientData -Tcl_VarTraceInfo( - Tcl_Interp *interp, /* Interpreter containing variable. */ - const char *varName, /* Name of variable; may end with "(index)" to - * signify an array reference. */ - int flags, /* OR-ed combo or TCL_GLOBAL_ONLY, - * TCL_NAMESPACE_ONLY (can be 0). */ - Tcl_VarTraceProc *proc, /* Function assocated with trace. */ - ClientData prevClientData) /* If non-NULL, gives last value returned by - * this function, so this call will return the - * next trace after that one. If NULL, this - * call will return the first trace. */ -{ - return Tcl_VarTraceInfo2(interp, varName, NULL, flags, proc, - prevClientData); -} - -/* - *---------------------------------------------------------------------- - * * Tcl_VarTraceInfo2 -- * * Same as Tcl_VarTraceInfo, except takes name in two pieces instead of |