Overview
| Artifact ID: | 56841424f9d9e2139805d5b18cf268280d609333 |
|---|---|
| Ticket: | 1352382fffffffffffffffffffffffffffffffff
Patch: efficiency saving in Tcl_CreateNamespace |
| User & Date: | afredd on 2006-08-11 21:37:08 |
Changes
- 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"