diff options
author | das <das@noemail.net> | 2008-08-20 11:45:32 (GMT) |
---|---|---|
committer | das <das@noemail.net> | 2008-08-20 11:45:32 (GMT) |
commit | 870ab014a27088ce489f2ef1690437a8abb23ace (patch) | |
tree | 8c1e04fd592dc63008c036a778722a4faf9a32e6 /generic/tclTest.c | |
parent | 577d14786458019195cd2953b8ba15991f7f5dfb (diff) | |
download | tcl-870ab014a27088ce489f2ef1690437a8abb23ace.zip tcl-870ab014a27088ce489f2ef1690437a8abb23ace.tar.gz tcl-870ab014a27088ce489f2ef1690437a8abb23ace.tar.bz2 |
* generic/tclTest.c (TestconcatobjCmd): fix use of internal-only
TclInvalidateStringRep macro.
[Bug 2057479]
FossilOrigin-Name: 9034e25f9fab903e22eec47d531344d63cd99611
Diffstat (limited to 'generic/tclTest.c')
-rw-r--r-- | generic/tclTest.c | 12 |
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 |