diff options
author | dgp <dgp@users.sourceforge.net> | 2017-09-12 15:13:07 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-09-12 15:13:07 (GMT) |
commit | fd2dad7405509f6046c59520f47ff51e00c996d6 (patch) | |
tree | 3f85730ac3a54e54b964b1319aecc20ed767b4ba /generic | |
parent | f1bcd5dfd6d6b5f81fafa7f3069ed59237b5c82b (diff) | |
download | tcl-fd2dad7405509f6046c59520f47ff51e00c996d6.zip tcl-fd2dad7405509f6046c59520f47ff51e00c996d6.tar.gz tcl-fd2dad7405509f6046c59520f47ff51e00c996d6.tar.bz2 |
Make sure ListObjAppendElement invalidates outdated intreps.
Diffstat (limited to 'generic')
-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 |