Skip to content
Tcl Source Code Artifact [baddd29b75]
Login

Artifact [baddd29b75]

Artifact baddd29b7596a5c899d53fdfc15d1f16106edc730d046a1c69f6a2e239c0e8ed:

Ticket change [baddd29b75] - Ticket [70f3b23caddc1a1c|70f3b23cad] <i>Tcl_InitStubs: is the &quot;-&quot; in the version requirement &quot;8.5-&quot; allowed?</i> status still Open with 3 other changes by apnadkarni on 2025-01-07 03:05:10.
D 2025-01-07T03:05:10.561
J icomment To\sclarify,\swhat\sI\swas\strying\sto\ssay\sis\sthat\sI\ssaw\sno\suse\sfor\sthe\sversion\sparameter.\sIn\smy\sview\sthe\sargument\spassed\sto\s`Tcl_InitStubs`\sshould\salways\sbe\s`TCL_VERSION`\sand\snever\sa\shardcoded\s"8.6"\sor\ssimilar.\sAnd\sthis\shas\snothing\sto\sdo\swith\sTcl\s8\svs\s9.\sIt\sensures\sthat\sany\sattempt\sto\sload\san\sextension\sinto\sa\sversion\sof\sTcl\solder\sthan\sthe\sone\sagainst\swhich\sit\sis\sbuilt\swill\sfail.\r\n\r\nFor\sexample,\sthe\sextension\smight\ssay\s`Tcl_InitStubs(...,\s"8.5",...)`\sbut\sthen\sbe\sbuilt\sagainst\sTcl\s8.6.\sThat\sbinary\sbuilt\sagainst\s8.6\sshould\snot\sbe\sloadable\sinto\s8.5.\sNo\smatter\sthe\sprogrammer's\sclaim\sthat\sit\sonly\suses\s8.5\sstubs\sfunctions.\sEven\sif\sthat\swas\sthe\scase\swhen\sinitially\swritten,\sover\stime\sas\sthe\sextension\sevolves,\s8.6\sstubs\smight\sbe\scalled.\sThe\swhole\spurpose\sis\sto\sprotect\sagainst\sinadvertent\sprogrammer\serrors\sand\shardcoding\s"8.5"\sdefeats\sthat\spurpose.\r\n\r\nPut\sit\sdifferently,\sthe\s`Tcl_InitStubs`\scall\sshould\snot\shave\shad\sa\sversion\sparameter\sat\sall.\sIt\sshould\shave\sjust\sused\s`TCL_VERSION`\sin\sit's\sinternal\schecks.\sIt's\stoo\slate\sto\schange\snow,\sbut\sthe\sadvice\sshould\sbe\sto\salways\sjust\spass\s`TCL_VERSION`\sto\sthe\sfunction.
J login apnadkarni
J mimetype text/x-markdown
K 70f3b23caddc1a1cf77a3f7ed7daa6f9f6405ee5
U apnadkarni
Z e230fe94e8929c909eb3cab979c5565c