Artifacts Associated With Ticket 30e4e9102
Ticket change [aa6680bcfb] (rid 216821) by apnadkarni on 2023-07-29 06:24:31:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-markdown"
- comment initialized to:
The `Tcl_ListObjIndex` command is documented to return `TCL_OK` and set the output `objPtr` to NULL in case the index is out of bounds. This is tested by the listObj-14.X tests and fails when the list is a lseq where an empty `Tcl_Obj` is returned in `objPtr` instead. My preference for a fix would be to define semantics of the `Tcl_ObjType.indexProc` to behave like `Tcl_ListObjIndex` and return NULL for this case (and `TCL_OK`). On a related note, the `Tcl_ObjType` methods including `indexProc` are documented in the manpages as paralleling the script level commands like `lindex`. This should really be documented as paralleling the C API for lists and should be implemented accordingly. (The TIP itself is silent on exact semantics). There are issues like sharing of objects etc. that do not arise at the script level but must be obeyed by the methods in the same manner as the public C API. There are also functional differences between the script and C levels, the above index bounds being just one. For folks writing abstract list variations, the distinction is important. /Ashok
- foundin initialized to: "9.0"
- is_private initialized to: "0"
- login: "apnadkarni"
- priority initialized to: "5 Medium"
- private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "apnadkarni"
- subsystem initialized to: "- New Builtin Commands"
- title initialized to:
Tcl_ListObjIndex returns empty string instead of NULL for lseq
- type initialized to: "Bug"
Ticket change [a41873d134] (rid 217060) by apnadkarni on 2023-08-08 08:14:48:
- assignee changed to: "griffin"
- icomment: "Brian, assigning to you for comments."
- login: "apnadkarni"
- mimetype: "text/plain"
Ticket change [43cb18b6d8] (rid 217069) by griffin on 2023-08-08 15:50:15:
- icomment:
What I vaguely recall is that I saw this pattern elsewhere and copied it. But clearly this is wrong. I will fix it.
- login: "griffin"
- mimetype: "text/plain"
- icomment:
Ticket change [7bcad28769] (rid 217073) by griffin on 2023-08-08 17:31:35:
- closedate changed to: "2460165.2302684"
- closer changed to: "griffin"
- icomment: "Fixed [93be83f416]"
- login: "griffin"
- mimetype: "text/x-fossil-plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"