Artifacts Associated With Ticket 1310081fffffffffffffffffffffffffffffffff
Ticket change [8d14c5cbe6] (rid 127866) by muonics on 2005-10-01 07:27:46:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Tcl_GetWideIntFromObj() appears to go through the string representation for all but tclWideIntType -- even for tclIntType. Tcl_GetIntFromObj() is optimized to deal with the internal representation already being tclWideIntType; seems a simple fix to optimize Tcl_GetWideIntFromObj() given that the wide int should be at least as (if not more) wide as a long. Index: tclObj.c =================================================================== RCS file: /home/CVSROOT/tcl/generic/tclObj.c,v retrieving revision 1.1.1.4 diff -u -p -r1.1.1.4 tclObj.c --- tclObj.c 23 May 2005 06:35:06 -0000 1.1.1.4 +++ tclObj.c 1 Oct 2005 07:09:29 -0000 @@ -2586,6 +2586,10 @@ Tcl_GetWideIntFromObj(interp, objPtr, wi *wideIntPtr = objPtr->internalRep.wideValue; return TCL_OK; } + if (objPtr->typePtr == &tclIntType) { + *wideIntPtr = objPtr->internalRep.longValue; + return TCL_OK; + } result = SetWideIntFromAny(interp, objPtr); if (result == TCL_OK) { *wideIntPtr = objPtr->internalRep.wideValue; (diffs are versus my local repository and 8.4.9, so version number's off versus SF CVS, but it should be obvious.) - foundin initialized to: "obsolete: 8.4.11"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "muonics"
- subsystem initialized to: "10. Objects"
- title initialized to: "Tcl_GetWideIntFromObj optimization"
- type initialized to: "Bug"
Ticket change [b3ad69a783] (rid 124894) by msofer on 2005-10-11 22:26:09:
- assignee changed to: "dgp"
Ticket change [93ecfee849] (rid 105886) by dgp on 2005-10-11 22:31:11:
- assignee changed to: "dkf"
Ticket change [39cf65be9d] (rid 112452) by dkf on 2005-11-29 21:30:43:
- closedate changed to: "2005-11-29T14:30:43"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 To maintain the 8.4 behaviour, must cast type to wideInt. Luckily, this is safe. This means that your patch is not accepted itself, but something recognizably similar is. 8.5 has bigints, and is therefore an (effectively) unrelated codebase.
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"