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

Artifact [8ad84f8c6b]

Artifact 8ad84f8c6bba9f5557e2b1da69392173ec6b5a97:

Ticket change [8ad84f8c6b] - Ticket [1917650fffffffff|1917650fff] <i>Tcl_ConvertToType(, , doubleType) incompatibility</i> status still Open with 4 other changes by dgp on 2008-06-17 11:43:15.
D 2008-06-17T11:43:15
J icomment Logged\sIn:\sYES\s\nuser_id=80530\nOriginator:\sNO\n\n\nThis\sbug\sreport\sis\scorrect.\s\sThe\sdocs\nare\sout\sof\sdate.\s\sWe'll\sget\sit\sfixed.\n\nThe\sold\srule\swas\sthe\sSetFooFromAny()\nroutine\swould\sset\sthe\sTcl_ObjType\sto\n"foo".\s\sIn\sthis\scase,\sSetDoubleFromAny()\nwould\sshimmer\sto\sthe\s"double"\sTcl_ObjType\nor\sfail.\s\sThis\sroutine\sforms\sthe\sguts\nof\sa\sTcl_ConvertToType()\scall,\sso\sthat\ncall\swould\salso\sproduce\sa\s"double"\nTcl_ObjType\sor\sfail.\n\nThe\snew\srule\sis\sthat\sSetFooFromAny()\ssets\nthe\sinternal\srep\sto\swhatever\sTcl_ObjType\nit\swants,\sso\sthat\sfuture\sGetFooFromObj()\ncalls\sare\sfast\scompared\swith\sconversion\nfrom\sstring.\s\sTcl_ConvertToType()\sno\slonger\nguarantees\sto\sconvert\sto\sthe\sTcl_ObjType\nyou\spass\sin,\sand\sthe\snew\sadvice\sis\sthat\nyou\sshouldn't\sbe\scalling\sTcl_ConvertToType\nin\sthe\sfirst\splace.\s\sLet\sthe\sowner\sof\sthe\nTcl_ObjType\suse\sit\s(and\shave\sthe\sfreedom\nto\schange\sit).\n\nFor\sthe\sparticular\sexample\sSetDoubleFromAny(),\nit\scan\sshimmer\sto\sany\snumeric\sTcl_ObjType.\nThat\sis,\sit\sdoes\sexactly\swhat\sTclParseNumber()\ndoes,\stake\sa\sstring\sand\sproduce\sthe\sTcl_Obj\nwith\sthe\smost\sappropriate\sinternal\snumeric\nrep\sto\shold\sthe\snumeric\svalue.\s\sThat's\swhy\nSetDoubleFromAny()\sis\simplemented\sas\sa\ssimple\ncall\sto\sTclParseNumber().\n\nThere\sis\sno\sTCL_PARSE_DOUBLE\sflag,\sso\sI\sdon't\nunderstand\syour\sparticular\squestion.\s\sAnd\sI\ndon't\sgrok\sdkf's\scomments\seither.\s\sI\swonder\nif\swe're\slooking\sat\sthe\ssame\sHEAD.\n\nYou\swent\son\sto\swrite\sa\snovel,\sbut\sI'm\sgetting\noff\snow.\n\n
J login dgp
J mimetype text/plain
J username dgp
K 1917650fffffffffffffffffffffffffffffffff
U dgp
Z 6a67bbcd294c3186a7b41f51a21406b5