Skip to content
Tcl Source Code Artifact [200c019536]
Login

Artifact [200c019536]

Artifact 200c0195363382070b32093c427f3c62957282a787fc7b7890847dd08a7ccc96:

Ticket change [200c019536] - Ticket [5808081213891824|5808081213] <i>&quot;string length&quot; converts bytearrays to strings when traced</i> status still Open with 3 other changes by dgp on 2017-11-30 16:14:02.
D 2017-11-30T16:14:02.745
J icomment \r\nThe\stracing\sforces\sgeneration\sof\sa\sstring\srep.\r\n\r\nAfter\sthe\sstring\srep\sis\sgenerated,\sthe\sbytearray\sis\sno\slonger\s"pure"\sso\sit\sbecomes\sworthless\s(Insert\sStandard\sRant\shere),\sand\scan\sno\slonger\stake\soptimized\spaths\sin\sTcl_GetCharLength()\sto\sprevent\sthe\sshimmer\sto\s"string"\stype.\r\n\r\nIn\sthis\sparticular\scase,\sthe\sstring\sin\squestion\sis\sthe\sempty\sstring.\r\n\r\nThe\smisbehavior\sdoes\snot\shappen\sin\sTcl\s8.7\sbecause\san\sadditional\soptimization\sfor\sstrings\sof\sless\sthan\s2\sbytes\shas\sbeen\sadded.\s\sI\shave\sno\squalms\sabout\sbackporting\sthat\ssmall,\sobviously\scorrect\sbit\sof\scode.\r\n\r\nSee\sdgp-properbytearry\sbranch\sfor\swork\stoward\smaking\sByteArrays\snot\sbe\sbroken\sas\sdesigned\sanymore,\sbut\sthat's\sa\sTcl\s9\sfix.\r\n\r\nAll\sthat\ssaid,\sit's\salso\spossible\sthat\sthe\sdefects\sof\snon-pure\sbytearray\svalues\sdon't\sactually\sget\sin\sthe\sway\sof\sgetting\sa\scorrect\svalue\sout\sof\sTcl_GetCharLength().
J login dgp
J mimetype text/plain
K 580808121389182456a680e5323ea346ac30e567
U dgp
Z b67f31a915f84c89ea2fd7cbc08261dd