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 | cd7e1651b17ee97ef7188b3771fb7d8291a9449a (patch) | |
tree | 66de8db16f5e91e8891a0c300612975e1eb9d8a2 /generic/tclUtil.c | |
parent | a720a9f6e21c4c9afd7a4b125478dc9800db11c2 (diff) | |
parent | ba5939ea3bf47fc00db9172391b3d68e24539921 (diff) | |
download | tcl-cd7e1651b17ee97ef7188b3771fb7d8291a9449a.zip tcl-cd7e1651b17ee97ef7188b3771fb7d8291a9449a.tar.gz tcl-cd7e1651b17ee97ef7188b3771fb7d8291a9449a.tar.bz2 |
Rewind from a refactoring that veered into the weeds.bug_3293874
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) { |