summaryrefslogtreecommitdiffstats
path: root/generic/tclVar.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-09-30 22:45:10 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-09-30 22:45:10 (GMT)
commit5c16366d01d19e9cacbb662827823e070bc606cf (patch)
tree6b2ec1f6f1ea65672138439c60138372dcf4414c /generic/tclVar.c
parentdd9bf5efaf27ae22d4c80c1e55bf79c422fb061c (diff)
downloadtcl-5c16366d01d19e9cacbb662827823e070bc606cf.zip
tcl-5c16366d01d19e9cacbb662827823e070bc606cf.tar.gz
tcl-5c16366d01d19e9cacbb662827823e070bc606cf.tar.bz2
* generic/tclNamespace.c (TclTeardownNamespace): Tcl_Obj-ified
* tests/namespace.test (namespace-8.5,6): the save/restore of ::errorInfo and ::errorCode during global namespace teardown. Revised the comment to clarify why this is done, and added tests that will fail if this is not done. * generic/tclResult.c (TclTransferResult): Added safety checks so that unexpected undefined ::errorInfo or ::errorCode will not lead to a segfault. * generic/tclVar.c (CallVarTraces): Save/restore the flag * tests/var.test (var-16.1): values that define part of the interpreter state during variable traces. [Bug 10381021].
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r--generic/tclVar.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 8478394..03b005e 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclVar.c,v 1.69.2.6 2004/08/16 14:18:26 msofer Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.69.2.7 2004/09/30 22:45:15 dgp Exp $
*/
#include "tclInt.h"
@@ -4133,6 +4133,7 @@ CallVarTraces(iPtr, arrayPtr, varPtr, part1, part2, flags, leaveErrMsg)
int copiedName;
int code = TCL_OK;
int disposeFlags = 0;
+ int saveErrFlags = iPtr->flags;
/*
* If there are already similar trace procedures active for the
@@ -4255,6 +4256,9 @@ CallVarTraces(iPtr, arrayPtr, varPtr, part1, part2, flags, leaveErrMsg)
*/
done:
+ if (code == TCL_OK) {
+ iPtr->flags = saveErrFlags;
+ }
if (code == TCL_ERROR) {
if (leaveErrMsg) {
CONST char *type = "";