summaryrefslogtreecommitdiffstats
path: root/generic/tclTest.c
diff options
context:
space:
mode:
authordas <das>2008-08-20 11:45:15 (GMT)
committerdas <das>2008-08-20 11:45:15 (GMT)
commit6318a3f2fcce17f013901a893ca69b8dd36843ee (patch)
treef605b53d2145a90c360a8ef03630a99bc298f908 /generic/tclTest.c
parent66b7825d012cdec4bf088bf8c35be432c0ade73a (diff)
downloadtcl-6318a3f2fcce17f013901a893ca69b8dd36843ee.zip
tcl-6318a3f2fcce17f013901a893ca69b8dd36843ee.tar.gz
tcl-6318a3f2fcce17f013901a893ca69b8dd36843ee.tar.bz2
* generic/tclTest.c (TestconcatobjCmd): fix use of internal-only
TclInvalidateStringRep macro. [Bug 2057479]
Diffstat (limited to 'generic/tclTest.c')
-rw-r--r--generic/tclTest.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index b2b0265..f332bf8 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTest.c,v 1.122 2008/08/17 14:15:25 msofer Exp $
+ * RCS: @(#) $Id: tclTest.c,v 1.123 2008/08/20 11:45:19 das Exp $
*/
#define TCL_TEST
@@ -6617,11 +6617,17 @@ TestconcatobjCmd(
list1Ptr = Tcl_NewStringObj("foo bar sum", -1);
Tcl_ListObjLength(NULL, list1Ptr, &len);
- TclInvalidateStringRep(list1Ptr);
+ if (list1Ptr->bytes != NULL) {
+ ckfree((char *) list1Ptr->bytes);
+ list1Ptr->bytes = NULL;
+ }
list2Ptr = Tcl_NewStringObj("eeny meeny", -1);
Tcl_ListObjLength(NULL, list2Ptr, &len);
- TclInvalidateStringRep(list2Ptr);
+ if (list2Ptr->bytes != NULL) {
+ ckfree((char *) list2Ptr->bytes);
+ list2Ptr->bytes = NULL;
+ }
/*
* Verify that concat'ing a list obj with one or more empty strings does