Artifacts Associated With Ticket 428572ffffffffffffffffffffffffffffffffff
Ticket change [1cc51195d0] (rid 90672) by nobody on 2001-05-30 07:04:45:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
This patch avoids a repeated strlen call by using the Counted versions of ScanElement and ConvertElement. Index: tclUtil.c ======================================================= ============ RCS file: /cvsroot/tcl/tcl/generic/tclUtil.c,v retrieving revision 1.18 diff -c -r1.18 tclUtil.c *** tclUtil.c 2000/05/08 21:59:59 1.18 --- tclUtil.c 2001/05/30 06:57:32 *************** *** 1452,1459 **** { int newSize, flags; char *dst; ! newSize = Tcl_ScanElement(string, &flags) + dsPtr->length + 1; /* * Allocate a larger buffer for the string if the current one isn't --- 1452,1461 ---- { int newSize, flags; char *dst; + int stringSize; ! stringSize = strlen (string); ! newSize = Tcl_ScanCountedElement(string, stringSize, &flags) + dsPtr->length + 1; /* * Allocate a larger buffer for the string if the current one isn't *************** *** 1490,1496 **** dst++; dsPtr->length++; } ! dsPtr->length += Tcl_ConvertElement(string, dst, flags); return dsPtr->string; } --- 1492,1498 ---- dst++; dsPtr->length++; } ! dsPtr->length += Tcl_ConvertCountedElement (string, stringSize, dst, flags); return dsPtr->string; } - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "11. Conversions from String"
- title initialized to: "Tcl_DStringAppendElement speedup"
- type initialized to: "Patch"
Ticket change [a0cd94edff] (rid 96873) by hobbs on 2001-06-04 08:23:55:
- closedate changed to: "2001-06-04T01:23:55"
- closer changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 patched into 8.4a3cvs.
- login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "hobbs"