From ab89ed9268a44b1889e679a445f260b00958a1cb Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 4 Apr 2001 07:14:16 +0000 Subject: * 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] --- generic/tclListObj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } } -- cgit v0.12