From a7d5eb42a94f26a9380e19ee52f52bf62c92cf50 Mon Sep 17 00:00:00 2001 From: das Date: Wed, 20 Aug 2008 11:45:32 +0000 Subject: * generic/tclTest.c (TestconcatobjCmd): fix use of internal-only TclInvalidateStringRep macro. [Bug 2057479] --- ChangeLog | 6 ++++++ generic/tclTest.c | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 52a2873..14f64f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-08-20 Daniel Steffen + + * generic/tclTest.c (TestconcatobjCmd): fix use of internal-only + TclInvalidateStringRep macro. + [Bug 2057479] + 2008-08-17 Miguel Sofer * generic/tclTest.c (TestconcatobjCmd): 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 -- cgit v0.12