diff options
author | dgp <dgp@users.sourceforge.net> | 2017-06-16 12:56:03 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-06-16 12:56:03 (GMT) |
commit | fdf4b7c6eef91298ad2b24e4f622229eb10cc9b5 (patch) | |
tree | 29e16803b99e27bb3b4a3dd5c5276f853df0e79e /generic | |
parent | bcc916d762591d6fae72ea0ba0ac0c747bcc0173 (diff) | |
download | tcl-fdf4b7c6eef91298ad2b24e4f622229eb10cc9b5.zip tcl-fdf4b7c6eef91298ad2b24e4f622229eb10cc9b5.tar.gz tcl-fdf4b7c6eef91298ad2b24e4f622229eb10cc9b5.tar.bz2 |
Extend cases where string rep generation can be prevented.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclStringObj.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 0a38836..261e01f 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -2966,9 +2966,25 @@ TclStringCatObjv( Tcl_GetStringFromObj(objPtr, &numBytes); /* PANIC? */ if (numBytes == 0) { + if (pendingPtr && pendingPtr->bytes) { + /* + * Generating string rep of objPtr also + * generated string rep of pendingPtr. + */ + if (pendingPtr->length) { + /* Can this happen? */ + goto foo; + } else { + /* string-29.14 */ + first = objc - 1; + last = 0; + pendingPtr = NULL; + } + } continue; } last = objc - oc; +foo: if (pendingPtr) { Tcl_GetStringFromObj(pendingPtr, &length); /* PANIC? */ pendingPtr = NULL; |