Artifacts Associated With Ticket 1352382fffffffff
Ticket change [2b37b30b61] (rid 118704) by nobody on 2005-11-09 17:09:14:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The code building the fully qualified namespace name in Tcl_CreateNamespace unnecesarily copies buffer1 and buffer2 back and forth. By using Tcl_DString pointers, you can swap pointers instead of copying one buffer to the other. This saves a call to TclDStringSetLength & one to Tcl_DStringAppend. Also the strlen(name) can be avoided as we have the DString's length. Patch also includes some other minor efficiency changes. (the patch is against 8.5a3)
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "None"
- title initialized to: "Patch: efficiency saving in Tcl_CreateNamespace"
- type initialized to: "Patch"
Add attachment "tclNamesp.c.patch" [f82c4e63f4] (rid 91496) by nobody on 2005-11-10 00:09:17.
Ticket change [71808a7723] (rid 100689) by nobody on 2005-11-10 00:09:17:
- icomment:
File Added - 155584: tclNamesp.c.patch
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [0f9bce3b89] (rid 94815) by dkf on 2005-11-28 16:36:49:
- assignee changed to: "dkf"
- subsystem changed to: "21. [namespace]"
Ticket change [9b790c7550] (rid 111131) by dkf on 2006-08-11 20:50:42:
- closedate changed to: "2006-08-11T13:50:42"
- closer changed to: "dkf"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [56841424f9] (rid 94333) by afredd on 2006-08-11 21:37:08:
- icomment:
Logged In: YES user_id=1386588 (afredd) It looks like a line of code got lost from the patch in 1.96: the "buffPtr" DString needs to be cleared before it is used each time. Currently it works for two part namespaces eg. "::tcl::mathfunc", but will generate a bad name if there are more parts. This will fix it: --- tclNamesp.c-orig 2006-08-11 15:28:55.203125000 +0100 +++ tclNamesp.c 2006-08-11 15:29:44.890625000 +0100 @@ -854,6 +854,7 @@ if (ancestorPtr != globalNsPtr) { register Tcl_DString *tempPtr = namePtr; + Tcl_DStringSetLength(buffPtr, 0); Tcl_DStringAppend(buffPtr, "::", 2); Tcl_DStringAppend(buffPtr, ancestorPtr->name, - 1); Tcl_DStringAppend(buffPtr, Tcl_DStringValue (namePtr), - login: "afredd"
- mimetype: "text/plain"
- username: "afredd"
- icomment: