diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2009-01-06 16:03:46 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2009-01-06 16:03:46 (GMT) |
commit | 1543ed93f676abd629ea913bfde2e73f180fe7af (patch) | |
tree | a6173a28f6e35f4bf19772f1afa4164ee42c96e9 /generic/tclDictObj.c | |
parent | 3532ac7221f55219a73fb4fc3ed74a8b34b3a37a (diff) | |
download | tcl-1543ed93f676abd629ea913bfde2e73f180fe7af.zip tcl-1543ed93f676abd629ea913bfde2e73f180fe7af.tar.gz tcl-1543ed93f676abd629ea913bfde2e73f180fe7af.tar.bz2 |
Corrected twiddling in internals of dictionaries so that literals can't get
destroyed.
Diffstat (limited to 'generic/tclDictObj.c')
-rw-r--r-- | generic/tclDictObj.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index f895555..666cf46 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.72 2008/12/10 11:15:05 dkf Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.73 2009/01/06 16:03:47 dkf Exp $ */ #include "tclInt.h" @@ -2137,10 +2137,11 @@ DictIncrCmd( */ char *saved = dictPtr->bytes; + Tcl_Obj *oldPtr = dictPtr; dictPtr->bytes = NULL; dictPtr = Tcl_DuplicateObj(dictPtr); - dictPtr->bytes = saved; + oldPtr->bytes = saved; } if (valuePtr == NULL) { /* |