2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
|
allFlags |= tracePtr->flags;
}
/*
* 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.
*/
for (activePtr = iPtr->activeVarTracePtr; activePtr != NULL;
activePtr = activePtr->nextPtr) {
if (activePtr->nextTracePtr == tracePtr) {
activePtr->nextTracePtr = tracePtr->nextPtr;
}
|
>
>
>
>
>
>
>
>
>
>
|
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
|
allFlags |= tracePtr->flags;
}
/*
* 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;
activePtr = activePtr->nextPtr) {
if (activePtr->nextTracePtr == tracePtr) {
activePtr->nextTracePtr = tracePtr->nextPtr;
}
|