summaryrefslogtreecommitdiffstats
path: root/generic/tclListObj.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-04-04 07:14:16 (GMT)
committerhobbs <hobbs>2001-04-04 07:14:16 (GMT)
commitab89ed9268a44b1889e679a445f260b00958a1cb (patch)
tree165b07311f61f39fad3283ee04aa89e64f765b44 /generic/tclListObj.c
parent37c0423fb0a23605324bffefe2cdc3650570c089 (diff)
downloadtcl-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/tclListObj.c')
-rw-r--r--generic/tclListObj.c3
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;
}
}