diff options
author | jan.nijtmans <jan.nijtmans@noemail.net> | 2011-06-20 11:59:53 (GMT) |
---|---|---|
committer | jan.nijtmans <jan.nijtmans@noemail.net> | 2011-06-20 11:59:53 (GMT) |
commit | 92cd42ea693f0b5aecf289eb524b4e2134fa77ae (patch) | |
tree | d4378dc4a193c780203ebbe55a1a398382f9443a /generic/tclTrace.c | |
parent | 51c530e5eda8b66d6ded4982f2183209db9a0dbd (diff) | |
parent | e3cdf03cb54e1613c1626a641c0cd692623ca78c (diff) | |
download | tcl-92cd42ea693f0b5aecf289eb524b4e2134fa77ae.zip tcl-92cd42ea693f0b5aecf289eb524b4e2134fa77ae.tar.gz tcl-92cd42ea693f0b5aecf289eb524b4e2134fa77ae.tar.bz2 |
Merg [3148192] implementation fix, and caveat comment
FossilOrigin-Name: d4da13a54e9660ab0d96663740fc0758503e8c19
Diffstat (limited to 'generic/tclTrace.c')
-rw-r--r-- | generic/tclTrace.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/generic/tclTrace.c b/generic/tclTrace.c index a60a80b..13359ee 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -2883,6 +2883,16 @@ Tcl_UntraceVar2( * The code below makes it possible to delete traces while traces are * active: it makes sure that the deleted trace won't be processed by * TclCallVarTraces. + * + * Caveat (Bug 3062331): When an unset trace handler on a variable + * tries to delete a different unset trace handler on the same variable, + * the results may be surprising. When variable unset traces fire, the + * traced variable is already gone. So the TclLookupVar() call above + * will not find that variable, and not finding it will never reach here + * to perform the deletion. This means callers of Tcl_UntraceVar*() + * attempting to delete unset traces from within the handler of another + * unset trace have to account for the possibility that their call to + * Tcl_UntraceVar*() is a no-op. */ for (activePtr = iPtr->activeVarTracePtr; activePtr != NULL; |