diff options
| author | dgp@users.sourceforge.net <dgp> | 2011-05-31 19:58:45 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2011-05-31 19:58:45 (GMT) |
| commit | 9b7074655dd815162eed5312d42ffd5749dc4562 (patch) | |
| tree | 66de8db16f5e91e8891a0c300612975e1eb9d8a2 /generic/tclUtil.c | |
| parent | 8533b0d540f852bbe9f05fe179a2acaf5b012d0a (diff) | |
| parent | 6593c167d4c24fc3b2496b7b177ebf96773bebfd (diff) | |
| download | tcl-9b7074655dd815162eed5312d42ffd5749dc4562.zip tcl-9b7074655dd815162eed5312d42ffd5749dc4562.tar.gz tcl-9b7074655dd815162eed5312d42ffd5749dc4562.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) { |
