Skip to content
Tcl Source Code Artifact [8d14c5cbe6]
Login

Artifact [8d14c5cbe6]

Artifact 8d14c5cbe61741e946ab3e753eddeabb9502b610:

Ticket change [8d14c5cbe6] - New ticket [1310081fffffffff|1310081fff] <i>Tcl_GetWideIntFromObj optimization</i>. by muonics on 2005-10-01 07:27:46.
D 2005-10-01T07:27:46
J assignee msofer
J cmimetype text/plain
J comment Tcl_GetWideIntFromObj()\sappears\sto\sgo\sthrough\sthe\nstring\srepresentation\sfor\sall\sbut\stclWideIntType\s--\neven\sfor\stclIntType.\s\sTcl_GetIntFromObj()\sis\soptimized\nto\sdeal\swith\sthe\sinternal\srepresentation\salready\sbeing\ntclWideIntType;\sseems\sa\ssimple\sfix\sto\soptimize\nTcl_GetWideIntFromObj()\sgiven\sthat\sthe\swide\sint\sshould\nbe\sat\sleast\sas\s(if\snot\smore)\swide\sas\sa\slong.\n\nIndex:\stclObj.c\n===================================================================\nRCS\sfile:\s/home/CVSROOT/tcl/generic/tclObj.c,v\nretrieving\srevision\s1.1.1.4\ndiff\s-u\s-p\s-r1.1.1.4\stclObj.c\n---\stclObj.c\s\s\s\s23\sMay\s2005\s06:35:06\s-0000\s\s\s\s\s\s1.1.1.4\n+++\stclObj.c\s\s\s\s1\sOct\s2005\s07:09:29\s-0000\n@@\s-2586,6\s+2586,10\s@@\sTcl_GetWideIntFromObj(interp,\nobjPtr,\swi\n\s\s\s\s\s\s\s\s*wideIntPtr\s=\sobjPtr->internalRep.wideValue;\n\s\s\s\s\s\s\s\sreturn\sTCL_OK;\n\s\s\s\s\s}\n+\s\s\s\sif\s(objPtr->typePtr\s==\s&tclIntType)\s{\n+\s\s\s\s\s\s\s*wideIntPtr\s=\sobjPtr->internalRep.longValue;\n+\s\s\s\s\s\s\sreturn\sTCL_OK;\n+\s\s\s\s}\n\s\s\s\s\sresult\s=\sSetWideIntFromAny(interp,\sobjPtr);\n\s\s\s\s\sif\s(result\s==\sTCL_OK)\s{\n\s\s\s\s\s\s\s\s*wideIntPtr\s=\sobjPtr->internalRep.wideValue;\n\n(diffs\sare\sversus\smy\slocal\srepository\sand\s8.4.9,\sso\nversion\snumber's\soff\sversus\sSF\sCVS,\sbut\sit\sshould\sbe\nobvious.)
J foundin obsolete:\s8.4.11
J priority 5\sMedium
J resolution None
J status Open
J submitter muonics
J subsystem 10.\sObjects
J title Tcl_GetWideIntFromObj\soptimization
J type Bug
K 1310081fffffffffffffffffffffffffffffffff
U muonics
Z 2cbfeb303d88bc1c3c55839f25504813