summaryrefslogtreecommitdiffstats
path: root/generic/tclTest.c
diff options
context:
space:
mode:
authordas <das>2008-08-20 11:45:32 (GMT)
committerdas <das>2008-08-20 11:45:32 (GMT)
commita7d5eb42a94f26a9380e19ee52f52bf62c92cf50 (patch)
tree8c1e04fd592dc63008c036a778722a4faf9a32e6 /generic/tclTest.c
parentd602e66103d1f659836379fa3669ad97e3d2f310 (diff)
downloadtcl-a7d5eb42a94f26a9380e19ee52f52bf62c92cf50.zip
tcl-a7d5eb42a94f26a9380e19ee52f52bf62c92cf50.tar.gz
tcl-a7d5eb42a94f26a9380e19ee52f52bf62c92cf50.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 82fa6ba..b50f6af 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.114.2.1 2008/08/17 14:12:33 msofer Exp $
+ * RCS: @(#) $Id: tclTest.c,v 1.114.2.2 2008/08/20 11:45:34 das Exp $
*/
#define TCL_TEST
@@ -7107,11 +7107,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