summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-09-12 13:23:40 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-09-12 13:23:40 (GMT)
commit8f08c5e1daec4ff43dc16a675df441e0ae9d9770 (patch)
tree0d996fc7ab1c35c43544a8f5ebd4e5f031d2e6da
parent566a7ccd92df0872c130cda8cc0c89d4da486457 (diff)
downloadtcl-8f08c5e1daec4ff43dc16a675df441e0ae9d9770.zip
tcl-8f08c5e1daec4ff43dc16a675df441e0ae9d9770.tar.gz
tcl-8f08c5e1daec4ff43dc16a675df441e0ae9d9770.tar.bz2
Revised dict value means we much invalidate existing intreps.
-rw-r--r--generic/tclDictObj.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index b312fe1..d0ef59d 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -911,7 +911,7 @@ InvalidateDictChain(
do {
dict->refCount++;
TclInvalidateStringRep(dictObj);
- Tcl_FreeIntRep(dictObj);
+ TclFreeIntRep(dictObj);
DictSetIntRep(dictObj, dict);
dict->epoch++;
@@ -965,6 +965,9 @@ Tcl_DictObjPut(
TclInvalidateStringRep(dictPtr);
hPtr = CreateChainEntry(dict, keyPtr, &isNew);
+ dict->refCount++;
+ TclFreeIntRep(dictPtr)
+ DictSetIntRep(dictPtr, dict);
Tcl_IncrRefCount(valuePtr);
if (!isNew) {
Tcl_Obj *oldValuePtr = Tcl_GetHashValue(hPtr);