Skip to content
Tcl Source Code Artifact [aa6680bcfb]
Login

Artifact [aa6680bcfb]

Artifact aa6680bcfbcdbdbf2c24336d68d3ad3490d757abcd2317b1a5eda0e65085975d:

Ticket change [aa6680bcfb] - New ticket [30e4e9102f3f1080|30e4e9102f] <i>Tcl_ListObjIndex returns empty string instead of NULL for lseq</i>. by apnadkarni on 2023-07-29 06:24:31.
D 2023-07-29T06:24:31.236
J assignee nobody
J closer nobody
J cmimetype text/x-markdown
J comment The\s`Tcl_ListObjIndex`\scommand\sis\sdocumented\sto\sreturn\s`TCL_OK`\sand\sset\sthe\soutput\s`objPtr`\sto\sNULL\sin\scase\sthe\sindex\sis\sout\sof\sbounds.\sThis\sis\stested\sby\sthe\slistObj-14.X\stests\sand\sfails\swhen\sthe\slist\sis\sa\slseq\swhere\san\sempty\s`Tcl_Obj`\sis\sreturned\sin\s`objPtr`\sinstead.\r\n\r\nMy\spreference\sfor\sa\sfix\swould\sbe\sto\sdefine\ssemantics\sof\sthe\s`Tcl_ObjType.indexProc`\sto\sbehave\slike\s`Tcl_ListObjIndex`\sand\sreturn\sNULL\sfor\sthis\scase\s(and\s`TCL_OK`).\r\n\r\nOn\sa\srelated\snote,\sthe\s`Tcl_ObjType`\smethods\sincluding\s`indexProc`\sare\sdocumented\sin\sthe\smanpages\sas\sparalleling\sthe\sscript\slevel\scommands\slike\s`lindex`.\sThis\sshould\sreally\sbe\sdocumented\sas\sparalleling\sthe\sC\sAPI\sfor\slists\sand\sshould\sbe\simplemented\saccordingly.\s(The\sTIP\sitself\sis\ssilent\son\sexact\ssemantics).\sThere\sare\sissues\slike\ssharing\sof\sobjects\setc.\sthat\sdo\snot\sarise\sat\sthe\sscript\slevel\sbut\smust\sbe\sobeyed\sby\sthe\smethods\sin\sthe\ssame\smanner\sas\sthe\spublic\sC\sAPI.\sThere\sare\salso\sfunctional\sdifferences\sbetween\sthe\sscript\sand\sC\slevels,\sthe\sabove\sindex\sbounds\sbeing\sjust\sone.\sFor\sfolks\swriting\sabstract\slist\svariations,\sthe\sdistinction\sis\simportant.\r\n\r\n/Ashok
J foundin 9.0
J is_private 0
J login apnadkarni
J priority 5\sMedium
J private_contact 9546e9877f1a8899e25a89082561ee694e7fb402
J resolution None
J severity Important
J status Open
J submitter apnadkarni
J subsystem -\sNew\sBuiltin\sCommands
J title Tcl_ListObjIndex\sreturns\sempty\sstring\sinstead\sof\sNULL\sfor\slseq
J type Bug
K 30e4e9102f3f1080713ce7766719d1fc02ea8ab0
U apnadkarni
Z b6ed443aaa2ef11b16ddfc4fc82bf2ed