diff options
author | ferrieux <ferrieux@noemail.net> | 2010-05-19 22:04:47 (GMT) |
---|---|---|
committer | ferrieux <ferrieux@noemail.net> | 2010-05-19 22:04:47 (GMT) |
commit | 72bb09b7c34e80a41072829ad94f7c9083c2e55d (patch) | |
tree | b835e0dcfefa487de2012fe83b3df637a66c9764 /generic/tclListObj.c | |
parent | b8dae6a6dc98acdd5b30fb1bcdbfd92da5efcf52 (diff) | |
download | tcl-72bb09b7c34e80a41072829ad94f7c9083c2e55d.zip tcl-72bb09b7c34e80a41072829ad94f7c9083c2e55d.tar.gz tcl-72bb09b7c34e80a41072829ad94f7c9083c2e55d.tar.bz2 |
Backport of fix for [Bug 3004007], EIAS violation in list-dict conversions.
FossilOrigin-Name: 716909f303906b255517ce38f3d4b5f1981b30c5
Diffstat (limited to 'generic/tclListObj.c')
-rw-r--r-- | generic/tclListObj.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 82ffa3d..b5065ec 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclListObj.c,v 1.49.2.3 2010/03/18 20:38:43 dgp Exp $ + * RCS: @(#) $Id: tclListObj.c,v 1.49.2.4 2010/05/19 22:04:48 ferrieux Exp $ */ #include "tclInt.h" @@ -1673,10 +1673,12 @@ SetListFromAny( /* * Dictionaries are a special case; they have a string representation such * that *all* valid dictionaries are valid lists. Hence we can convert - * more directly. + * more directly. Only do this when there's no existing string rep; if + * there is, it is the string rep that's authoritative (because it could + * describe duplicate keys). */ - if (objPtr->typePtr == &tclDictType) { + if (objPtr->typePtr == &tclDictType && !objPtr->bytes) { Tcl_Obj *keyPtr, *valuePtr; Tcl_DictSearch search; int done, size; |