diff options
author | andy <andrew.m.goth@gmail.com> | 2016-12-24 23:58:29 (GMT) |
---|---|---|
committer | andy <andrew.m.goth@gmail.com> | 2016-12-24 23:58:29 (GMT) |
commit | 7c99a698fd3f179581a181dca262acd85d9a107c (patch) | |
tree | 5cd7f57ead4a8c987f0a4cd9e29c8abb2ad024a6 /generic/tclExecute.c | |
parent | ed7e266bfb3364bdbf7ae0da5edcb20aa597a46c (diff) | |
download | tcl-7c99a698fd3f179581a181dca262acd85d9a107c.zip tcl-7c99a698fd3f179581a181dca262acd85d9a107c.tar.gz tcl-7c99a698fd3f179581a181dca262acd85d9a107c.tar.bz2 |
Bug [46a2410650]: Create macro TclIsVarArraySearched to check if an array variable has an active search, and modify INST_UNSET_ARRAY to fall back on the slow unset method for array elements within an array being searched. The slow unset method involves a call to DeleteSearches() which stops all active searches.
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r-- | generic/tclExecute.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 9103da0..d46353e 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -4034,12 +4034,13 @@ TEBCresume( } TRACE(("%s %u \"%.30s\" => ", (flags ? "normal" : "noerr"), opnd, O2S(part2Ptr))); - if (TclIsVarArray(arrayPtr) && !UnsetTraced(arrayPtr)) { + if (TclIsVarArray(arrayPtr) && !UnsetTraced(arrayPtr) + && !TclIsVarArraySearched(arrayPtr)) { varPtr = VarHashFindVar(arrayPtr->value.tablePtr, part2Ptr); if (varPtr && TclIsVarDirectUnsettable(varPtr)) { /* - * No nasty traces and element exists, so we can proceed to - * unset it. Might still not exist though... + * No nasty traces or searchesw and element exists, so we can + * proceed to unset it. Might still not exist though... */ if (!TclIsVarUndefined(varPtr)) { |