diff options
author | dgp <dgp@users.sourceforge.net> | 2011-05-31 19:58:45 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2011-05-31 19:58:45 (GMT) |
commit | b69417fda3fb4e5bb10126afe76175d2b636f738 (patch) | |
tree | 66de8db16f5e91e8891a0c300612975e1eb9d8a2 /generic/tclUtil.c | |
parent | dc4fa5fd8ac0bbbf3e3f976b8a451d028abe0830 (diff) | |
parent | b897ccd14c49256e638cf75ca68fe13ac89af6d3 (diff) | |
download | tcl-b69417fda3fb4e5bb10126afe76175d2b636f738.zip tcl-b69417fda3fb4e5bb10126afe76175d2b636f738.tar.gz tcl-b69417fda3fb4e5bb10126afe76175d2b636f738.tar.bz2 |
Rewind from a refactoring that veered into the weeds.
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r-- | generic/tclUtil.c | 23 |
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) { |