diff options
author | dgp <dgp@users.sourceforge.net> | 2017-09-12 15:18:46 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-09-12 15:18:46 (GMT) |
commit | ed8604f566febdc366bae97f8d431a20612b3bfb (patch) | |
tree | e57748f5befcd157efdb55e14a31b2968ae3e909 /generic/tclListObj.c | |
parent | bbcc51539b6cbb04bdee6c87c3f321d0f47d583b (diff) | |
download | tcl-ed8604f566febdc366bae97f8d431a20612b3bfb.zip tcl-ed8604f566febdc366bae97f8d431a20612b3bfb.tar.gz tcl-ed8604f566febdc366bae97f8d431a20612b3bfb.tar.bz2 |
Make sure ListObjAppendElement invalidates outdated intreps.
Diffstat (limited to 'generic/tclListObj.c')
-rw-r--r-- | generic/tclListObj.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c index c33b95e..fc253cc 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -711,6 +711,10 @@ Tcl_ListObjAppendElement( listRepPtr = newPtr; } ListResetIntRep(listPtr, listRepPtr); + listRepPtr->refCount++; + TclFreeIntRep(listPtr); + ListSetIntRep(listPtr, listRepPtr); + listRepPtr->refCount--; /* * Add objPtr to the end of listPtr's array of element pointers. Increment |