diff options
author | dgp <dgp@users.sourceforge.net> | 2017-09-12 13:21:47 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-09-12 13:21:47 (GMT) |
commit | f1bcd5dfd6d6b5f81fafa7f3069ed59237b5c82b (patch) | |
tree | 65e23333145cb6c483472f89646a00b38a4dc048 /generic | |
parent | b6bf5c825247827226680949d75a3b590b6631a7 (diff) | |
download | tcl-f1bcd5dfd6d6b5f81fafa7f3069ed59237b5c82b.zip tcl-f1bcd5dfd6d6b5f81fafa7f3069ed59237b5c82b.tar.gz tcl-f1bcd5dfd6d6b5f81fafa7f3069ed59237b5c82b.tar.bz2 |
Revised dict value means we much invalidate existing intreps.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclDictObj.c | 5 |
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); |