Skip to content
Tcl Source Code Artifact [e570077f2f]
Login

Artifact [e570077f2f]

Artifact e570077f2fc5dd8723778a5e9f202af548d4e61f9e83ceace46be2d65ec78ab3:

Ticket change [e570077f2f] - Ticket [b343fe8656c16b2e|b343fe8656] <i>TIP 636 Tcl_ListObjIndex incompatibility not documented</i> status still Open with 3 other changes by apnadkarni on 2024-11-29 00:03:53.
D 2024-11-29T00:03:53.890
J icomment I\s*think*\sthat\sbranch\smostly\sdescribes\swhat\sthe\scaller\sneeds\sto\sdo\sexcept\sfor\sone\scase.\r\n\r\n1.\s`Tcl_ListObjIndex`\smay\sreturn\sa\s`Tcl_Obj`\swith\s(a)\san\sinternal\sreference\sheld\s(non-0\sref\scount)\sor\s(b)\sa\s0\sref\scount.\r\n\r\n2.\sThe\scaller\smay\seither\s(a)\shold\son\sto\sthe\sobject,\s(b)\ssimply\saccess\sthe\scontent\sand\sdispose\sof\sit,\sor\s(c)\spass\sit\sto\sanother\sfunction.\r\n\r\nThe\scase\snot\sdescribed\sthat\sneeds\smore\sclarity\sis\s1(b)\swith\s2(c).\sIn\sthat\scase,\sI\sdon't\sthink\s`Tcl_BounceRefCount`\sis\salways\ssafe.\sIn\sparticular\sif\sthe\ssecond\sfunction\sthat\sis\scalled\sis\sa\s"hairy\smonster"\slike\s`Tcl_ObjSetVar2`,\sthe\scorrect\ssequence\sis\swrapping\sthat\scall\sbetween\sa\sIncrRefCount\sand\sDecrRefCount\sand\snot\sBounce.\r\n\r\nBut\sexplaining\sthat\ssuccinctly\sis\sanother\smatter.\r\n\r\nA\srelated\snote\s-\sthere\sis\salso\sa\sREFERENCE\sCOUNT\sMANAGEMENT\ssection\sin\sthat\spage.\r\n\r\nMy\ssuggestion\sis\sto\smerge\sinto\sthe\strunk\sbut\sleave\sthis\sticket\sopen\sas\sa\sreminder\sto\sclarify\sthe\sabovementioned\scase.
J login apnadkarni
J mimetype text/x-markdown
K b343fe8656c16b2e02580f68423b6ef03463915c
U apnadkarni
Z 4e547b990bd12369c1f85fc181828091