summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2011-05-31 19:58:45 (GMT)
committerdgp <dgp@noemail.net>2011-05-31 19:58:45 (GMT)
commit1a146366032829ae99c63d07329416b927768f34 (patch)
tree66de8db16f5e91e8891a0c300612975e1eb9d8a2 /generic/tclUtil.c
parent49f033153bafda3372c838648b25c2dd7974233b (diff)
parent74a8254eb62926a16d8405e59fd7848d728fbc11 (diff)
downloadtcl-1a146366032829ae99c63d07329416b927768f34.zip
tcl-1a146366032829ae99c63d07329416b927768f34.tar.gz
tcl-1a146366032829ae99c63d07329416b927768f34.tar.bz2
Rewind from a refactoring that veered into the weeds.
FossilOrigin-Name: 1d247886dbc19d9a7b4d1135f8c21b97c7c3c8cc
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 3b5b527..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
- * LIST_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, LIST_MAX, 0, listc, listv);
- } else {
- resPtr = TclListObjCopy(NULL, objPtr);
- }
+ if (resPtr) {
+ Tcl_ListObjAppendList(NULL, resPtr, objPtr);
+ } else {
+ resPtr = TclListObjCopy(NULL, objPtr);
}
}
if (!resPtr) {