Skip to content
Tcl Source Code Artifact [9ba1ec3175]
Login

Artifact [9ba1ec3175]

Artifact 9ba1ec31755e4bb6b38346cad676e56f3177abddae0e73c0168696abc73371d3:

Ticket change [9ba1ec3175] - Ticket [0c82728f85760f36|0c82728f85] <i>lappend/linsert ignore the abstract-list Replace hook on some code paths</i> status still Open with 3 other changes by rocketship98 on 2026-10-21 00:01:55.
D 2026-10-21T00:01:55.785
J icomment While\slooking\sat\swhy\slinsert\sbehaves\sdifferently\sfrom\slappend\sfor\sus,\sI\sbelieve\sI\sfound\sthe\scause\sof\sthe\slinsert\scase\s(claude\sis\smore\scertain,\sand\she's\sthe\sI\sbelow\sin\sthis\scomment).\r\n\r\nIn\sTcl_LinsertObjCmd\s(tclCmdIL.c)\sthere\sis\sa\sspecial\scase\sfor\sinserting\sexactly\sone\selement\sat\sthe\send\sof\sthe\slist:\r\n\r\n\s\s\s\sif\s((objc\s==\s4)\s&&\s(index\s==\slen))\s{\r\n\s\s\s\s\s\s\s\sresult\s=\sTcl_ListObjAppendElement(NULL,\slistPtr,\sobjv[3]);\r\n\r\nTcl_ListObjAppendElement\sdoes\snot\scall\sthe\sReplace\shook\sof\san\sabstract\slist,\sso\sthe\svalue\sis\sconverted\sto\san\sordinary\slist.\sEvery\sother\sform\sof\slinsert\s(two\sor\smore\selements,\smiddle,\sstart)\scalls\sTcl_ListObjReplace,\swhich\sdoes\scall\sthe\shook,\sand\skeeps\sthe\stype.\sThe\scode\sis\sthe\ssame\sin\s9.0.4\sand\s9.1.1,\sapart\sfrom\sthe\sargument\sdeclarations.\r\n\r\nChanging\sthat\sone\scall\sto\sthe\sfollowing\smade\sall\sthe\slinsert\sforms\sI\stried\skeep\sthe\stype,\son\sboth\sa\s9.0.4\sand\sa\s9.1.1\sbuild\s(compiled\sat\stop\slevel,\scommand\sname\sin\sa\svariable,\svia\seval,\sin\sa\sproc).\sThe\score's\scmdIL,\slistObj,\slist\sand\slinsert\stest\sfiles\salso\spass\swith\sit\s(324\stests,\s0\sfailed);\sI\shave\snot\srun\sthe\srest\sof\sthe\score\stest\ssuite:\r\n\r\n\s\s\s\sresult\s=\sTcl_ListObjReplace(NULL,\slistPtr,\slen,\s0,\s1,\s&objv[3]);\r\n\r\nSeparately,\sfor\slappend:\sI\sbelieve\sthe\splaces\swhere\s9.1\salready\skeeps\sthe\stype\s(eval,\suplevel\s#0)\sare\swhere\slappendListPtr\sin\stclExecute.c\scalls\sTcl_ListObjReplace\sinstead\sof\sTclListObjAppendElements,\swhich\s9.0.4\sstill\sdoes:\r\n\r\n\s\s\s\s9.0.4:\s\sTclListObjAppendElements(interp,\svalueToAssign,\sobjc,\sobjv)\r\n\s\s\s\s9.1:\s\s\s\sTcl_ListObjReplace(interp,\svalueToAssign,\slen,\s0,\sobjc,\sobjv)\r\n\r\nChanging\sjust\sthat\scall\sin\sa\s9.0.4\sbuild\sgave\sthe\s9.1.1\sresults\sfor\sthose\stwo\scases.\sI\sthink\sthe\schange\smay\scome\sfrom\sthe\sfix\sfor\sINST_LAPPEND_LIST\swith\szero-length\slists\s(dkf,\strunk,\sMay\s2025),\sbut\sI\scould\snot\sconfirm\sthat\sfrom\sthe\srepository\shistory.\sThe\scase\sthat\sstill\sloses\sthe\stype\son\sboth\sversions\sis\sa\splain\slappend\sinside\sa\sproc,\swhich\sis\swhat\sthis\sticket\scovers.
J login rocketship98
J mimetype text/plain
K 0c82728f85760f36361fe42a15f55453c94d285d
U rocketship98
Z 2579402f6de7c6302285c4b4ffec14ea