<i>Regression in Tcl_UtfCharComplete</i> status still Open with 3 other changes
by
.
D 2020-04-21T10:19:25.358
J icomment OK,\sthe\spromised\sexplanation.\sThe\sinvariant\sis\sthat\sTcl_UtfCharComplete(src,\sTCL_UTF_MAX)\sshould\salways\sreturn\strue.\sSince\sTCL_UTF_MAX\sis\sthe\smaximum\snumber\sof\sbytes\sTcl_UtfToUniChar()\scan\sadvance,\ssupplying\sa\sbuffer\sof\sTCL_UTF_MAX\sbytes\sshould\sbe\senough\sfor\sTcl_UtfToUniChar()\sto\sadvance.\sThis\smeans\sthat\sthe\stable\sused\sby\sTcl_UtfCharComplete()\scan\snot\shave\sany\stable\sentry\swith\sa\svalue\s>\sTCL_UTF_MAX.\r\n\r\nWell,\sI\smade\sthe\ssame\smistake\sin\sthe\sTIP\s#542\simplementation.\sI\scorrected\sthat\sin\scommit\s[5f382f20565ff8ed]\s(together\swith\sanother\ssmall\simprovement,\shandling\sbyte\sC1\sas\sinvalid).\r\n\r\nThere's\sanother\ssmall\scornercase,\smissed\sin\sthe\sTIP\s#542\simplementation.\sIf\san\sextension\sis\scompiled\swith\sTCL_UTF_MAX=4\swhile\sTcl\sis\sbuilt\swith\sTCL_UTF_MAX=3,\sthen\sit\smight\shappen\sthat\sthe\sextension\scalls\sTcl_UtfCharComplete()\swhich\sthen\smight\sgive\sthe\swrong\sresult.\sFor\sTcl_UtfToUniChar()\sspecial\sstub\sentries\sare\screated\sfor\sthis\spurpose,\sbut\sfor\sTcl_UtfCharComplete()\sthere\sare\snot\sseparate\sstub\sentries\sfor\sTCL_UTF_MAX=3\sand\sTCL_UTF_MAX=4.\sThe\seasiest\sfix\sis\ssupplying\sa\smacro\sfor\sthis\scorner-case.\sFixed\shere:\s[8d2927e1c43e9c83]\r\n\r\nSo,\slet's\sfix\s[27944a3661]\sfirst,\sthen\sI'll\scontinue\shandling\sthis\sfor\score-8-6-branch.
J login jan.nijtmans
J mimetype text/x-fossil-wiki
K c11e0c5ce426ac09151318d346c910b67d92346f
U jan.nijtmans
Z 88141b1bcfaf98485a41232934aa071f