summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-06-08 20:40:45 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-06-08 20:40:45 (GMT)
commitb0e8c40cebd7999b6ccf308dbf0ebb8e3be0ab0b (patch)
tree496649d43716085e50b6a98528d58cf59b80bd62
parent1a49b000a0d9e7c09366f62d7ccbc904a45b6b68 (diff)
downloadtcl-b0e8c40cebd7999b6ccf308dbf0ebb8e3be0ab0b.zip
tcl-b0e8c40cebd7999b6ccf308dbf0ebb8e3be0ab0b.tar.gz
tcl-b0e8c40cebd7999b6ccf308dbf0ebb8e3be0ab0b.tar.bz2
More streamlining.
-rw-r--r--generic/tclStringObj.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 847182d..c4d07e0 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -2967,17 +2967,9 @@ TclStringCatObjv(
last = objc - oc;
if (length == 0) {
if (pendingPtr) {
- int pendingNumBytes;
-
- Tcl_GetStringFromObj(pendingPtr, &pendingNumBytes); /* PANIC? */
- if (pendingNumBytes) {
- if ((length += pendingNumBytes) < 0) {
- goto overflow;
- }
- } else {
- first = last;
- }
- } else {
+ Tcl_GetStringFromObj(pendingPtr, &length); /* PANIC? */
+ }
+ if (length == 0) {
first = last;
}
}
@@ -3080,9 +3072,10 @@ TclStringCatObjv(
} else {
/* Efficiently concatenate string reps */
char *dst;
- int start;
if (inPlace && !Tcl_IsShared(*objv)) {
+ int start;
+
objResultPtr = *objv++; objc--;
Tcl_GetStringFromObj(objResultPtr, &start);