summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-05-31 20:36:31 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-05-31 20:36:31 (GMT)
commit9d5b29a8051a1ca0b93a8fcdb7058920dad2a883 (patch)
treed04f46f284569671adefc78cfe80a141947431be /generic/tclUtil.c
parentba5939ea3bf47fc00db9172391b3d68e24539921 (diff)
parentcd7e1651b17ee97ef7188b3771fb7d8291a9449a (diff)
downloadtcl-9d5b29a8051a1ca0b93a8fcdb7058920dad2a883.zip
tcl-9d5b29a8051a1ca0b93a8fcdb7058920dad2a883.tar.gz
tcl-9d5b29a8051a1ca0b93a8fcdb7058920dad2a883.tar.bz2
Fix bug 3293874
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index f7f4bf4..ce66096 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -1778,31 +1778,16 @@ Tcl_ConcatObj(
}
}
if (i == objc) {
- Tcl_Obj **listv;
- int listc;
-
resPtr = NULL;
for (i = 0; i < objc; i++) {
- /*
- * Tcl_ListObjAppendList could be used here, but this saves us a
- * bit of type checking (since we've already done it). Use of
- * INT_MAX tells us to always put the new stuff on the end. It
- * will be set right in Tcl_ListObjReplace.
- * Note that all objs at this point are either lists or have an
- * empty string rep.
- */
-
objPtr = objv[i];
if (objPtr->bytes && objPtr->length == 0) {
continue;
}
- TclListObjGetElements(NULL, objPtr, &listc, &listv);
- if (listc) {
- if (resPtr) {
- Tcl_ListObjReplace(NULL, resPtr, INT_MAX, 0, listc, listv);
- } else {
- resPtr = TclListObjCopy(NULL, objPtr);
- }
+ if (resPtr) {
+ Tcl_ListObjAppendList(NULL, resPtr, objPtr);
+ } else {
+ resPtr = TclListObjCopy(NULL, objPtr);
}
}
if (!resPtr) {