Artifacts Associated With Ticket 217867ffffffffff
Ticket change [22dff9fb0d] (rid 130830) by nobody on 2000-10-26 00:45:06:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 2098 RFE Version: 8.1 SubmitDate: '1999-05-19' LastModified: '1999-08-06' Severity: LOW Status: Closed Submitter: pat ChangedBy: hobbs RelatedBugIDs: 2101 2257 OS: Solaris OSVersion: 2.5.1 Machine: Other FixedDate: '2000-10-25' ClosedDate: '1999-08-06' Name: Jeffrey Hobbs CVS: May 17, tclUtil.c $Id: tclUtil.c,v 1.11 1999/05/06 19:21:11 stanton Exp $ CustomShell: mod core? not me... Comments: In tests on larger lists, this actually takes a bit more time to return to assemble and return the object than the regular bytes concat mode. However, when the returned object is next used as a list (like with foreach), there is a notable time savings. Again, this only affects calls to concat where all args passed are already recgonized list objects. This passes all tests, and doesn't break any syntax logic. DesiredBehavior: As pointed out on c.l.tcl, concat actually converts everything to strings and returns a string, as opposed to what the docs say. This features enhancement involves situations where concat was passed only objects of the list type. In this case, it concats them together into one list, and returns an object of type list. Patch: The following needs to be inserted as the first code in Tcl_ConcatObj in tclUtil.c: for (i = 0; i < objc; i++) { if (objv[i]->typePtr != &tclListType) { break; } } if (i == objc) { Tcl_Obj **listv; int listc; /* * All the items are of list type, concat them together * as lists, and return as a list obj */ objPtr = Tcl_NewListObj(0, NULL); for (i = 0; i < objc; i++) { /* * No check is made on the result code, as we checked * above that they are all of list type... */ Tcl_ListObjGetElements(NULL, objv[i], &listc, &listv); Tcl_ListObjReplace(NULL, objPtr, INT_MAX, 0, listc, listv); } return objPtr; } PatchFiles: generic/tclUtil.c - foundin initialized to: "obsolete: 8.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to: "concat support for list objects"
- type initialized to: "Bug"
Ticket change [b14c44e238] (rid 98125) by welch on 2000-10-26 07:59:48:
- closedate changed to: "2000-10-26T00:59:48"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Invalid"
- status changed to: "Closed"
Ticket change [229a5eb0e7] (rid 130777) by dgp on 2001-04-13 23:35:26:
- closedate changed to: "2001-04-13T16:35:26"
- closer changed to: "dgp"
- subsystem changed to: "10. Objects"