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)
commit3478e0c6d58f1cbe7c8136945689d85f18d2f8a5 (patch)
treef605b53d2145a90c360a8ef03630a99bc298f908 /generic/tclTest.c
parent9ada377c0833981562104212e2c7b701809184d9 (diff)
downloadtcl-3478e0c6d58f1cbe7c8136945689d85f18d2f8a5.zip
tcl-3478e0c6d58f1cbe7c8136945689d85f18d2f8a5.tar.gz
tcl-3478e0c6d58f1cbe7c8136945689d85f18d2f8a5.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