diff options
author | hobbs <hobbs> | 2001-04-04 07:14:16 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-04-04 07:14:16 (GMT) |
commit | ab89ed9268a44b1889e679a445f260b00958a1cb (patch) | |
tree | 165b07311f61f39fad3283ee04aa89e64f765b44 /generic | |
parent | 37c0423fb0a23605324bffefe2cdc3650570c089 (diff) | |
download | tcl-ab89ed9268a44b1889e679a445f260b00958a1cb.zip tcl-ab89ed9268a44b1889e679a445f260b00958a1cb.tar.gz tcl-ab89ed9268a44b1889e679a445f260b00958a1cb.tar.bz2 |
* generic/tclListObj.c (Tcl_SetListObj): set objPtr->length = 0 in
empty object case to maintain sanctity of Tcl_Obj bytes/length
pairing. (porter) [Patch #405998]
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclListObj.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c index bb0aa2b..fb4a06b 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.7 1999/08/10 22:45:11 redman Exp $ + * RCS: @(#) $Id: tclListObj.c,v 1.8 2001/04/04 07:14:16 hobbs Exp $ */ #include "tclInt.h" @@ -265,6 +265,7 @@ Tcl_SetListObj(objPtr, objc, objv) objPtr->typePtr = &tclListType; } else { objPtr->bytes = tclEmptyStringRep; + objPtr->length = 0; } } |