summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclTest.c12
2 files changed, 15 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ca1e984..0ac5357 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-08-20 Daniel Steffen <das@users.sourceforge.net>
+
+ * generic/tclTest.c (TestconcatobjCmd): fix use of internal-only
+ TclInvalidateStringRep macro.
+ [Bug 2057479]
+
2008-08-17 Miguel Sofer <msofer@users.sf.net>
* generic/tclBasic.c: Implementation of [coroutine] and [yield]
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