summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2010-10-02 16:04:29 (GMT)
committerKevin B Kenny <kennykb@acm.org>2010-10-02 16:04:29 (GMT)
commit845f29c25c98e563d2887cbfcf16f1963ecc20bb (patch)
tree5f620de3f16a930ef11d1d791e3100d4b9983e9a /generic/tclExecute.c
parent7761e7d99c2161de375c85db2076faef03f286e8 (diff)
downloadtcl-845f29c25c98e563d2887cbfcf16f1963ecc20bb.zip
tcl-845f29c25c98e563d2887cbfcf16f1963ecc20bb.tar.gz
tcl-845f29c25c98e563d2887cbfcf16f1963ecc20bb.tar.bz2
* generic/tclAssembly.c:
* generic/tclAssembly.h: * tests/assemble.test: Added dictAppend, dictIncrImm, dictLappend, dictSet, dictUnset, nsupvar, upvar, and variable. (Still need tests for the last three.) Merged changes from HEAD.
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 6f3701c..3f7c420 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclExecute.c,v 1.494.2.4 2010/10/02 01:38:27 kennykb Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.494.2.5 2010/10/02 16:04:29 kennykb Exp $
*/
#include "tclInt.h"
@@ -5768,6 +5768,16 @@ TEBCresume(
Tcl_DictObjPut(NULL, dictPtr, OBJ_UNDER_TOS, valuePtr);
} else {
Tcl_AppendObjToObj(valuePtr, OBJ_AT_TOS);
+
+ /*
+ * Must invalidate the string representation of dictionary
+ * here because we have directly updated the internal
+ * representation; if we don't, callers could see the wrong
+ * string rep despite the internal version of the dictionary
+ * having the correct value. [Bug 3079830]
+ */
+
+ TclInvalidateStringRep(dictPtr);
}
break;
case INST_DICT_LAPPEND:
@@ -5798,6 +5808,16 @@ TEBCresume(
}
goto gotError;
}
+
+ /*
+ * Must invalidate the string representation of dictionary
+ * here because we have directly updated the internal
+ * representation; if we don't, callers could see the wrong
+ * string rep despite the internal version of the dictionary
+ * having the correct value. [Bug 3079830]
+ */
+
+ TclInvalidateStringRep(dictPtr);
}
break;
default:
@@ -6021,6 +6041,9 @@ TEBCresume(
if (allocdict) {
dictPtr = Tcl_DuplicateObj(dictPtr);
}
+ if (length > 0) {
+ TclInvalidateStringRep(dictPtr);
+ }
for (i=0 ; i<length ; i++) {
Var *var2Ptr = LOCAL(duiPtr->varIndices[i]);