<i>Tcl_InitStubs: is the "-" in the version requirement "8.5-" allowed?</i>.
by
.
D 2024-12-15T17:46:31.573
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-wiki
J comment The\swiki\spage\sfor\sextension\smigration\s[https://core.tcl-lang.org/tcl/wiki?name=Migrating+C+extensions+to+Tcl+9&p]\scontains:\r\n\r\n<verbatim>\r\n#ifdef\sUSE_TCL_STUBS\r\n\s\s\s\sif\s(Tcl_InitStubs(interp,\s"8.5-",\s0)\s==\sNULL)\r\n#else\r\n\s\s\s\sif\s(Tcl_PkgRequire(interp,\s"Tcl",\s"8.5-",\s0)\s==\sNULL)\r\n#endif\r\n\s\s\s\s{\r\n\s\s\s\s\s\s\s\sreturn\sTCL_ERROR;\r\n\s\s\s\s}\r\n</verbatim>\r\n\r\nThis\smight\sbe\swrong\sin\stwo\ssenses:\r\n\r\n\s\s\s*\s\s\sThe\s#ifdef\sis\snot\srequired,\sas\swithout\sdefining\sUSE_TCL_STUBS,\s"Tcl_InitStubs"\sworks\slike\s"Tcl_PkgRequire"\r\n\s\s*\s\s\sFollowing\sthe\sTcl_InitStubs\sdocumentation,\sthe\s"-"\scharter\sis\snot\sallowed\swithin\sthe\sargument.\r\n\r\nAlso,\sthe\ssample\sextension\sis\srelated\shere.\r\n\r\nHere\sis\sthe\sTCL\s8.6.\sdescription\sstating,\sthat\sonly\snumbers\sand\sdots\sare\sallowed:\r\n[https://core.tcl-lang.org/tcl/file?name=doc/InitStubs.3&ci=84c07aaa29698bb8&ln=23-24]\r\nIMHO,\sthe\s"PackageRequire"\scapability\swithout\s"USE_TCL_STUBS"\sis\salso\sundocumented.\r\n\r\nHere\sis\sthe\s9.0\s(main)\sdescription\swhich\sis\sidentical:\r\n[https://core.tcl-lang.org/tcl/file?udc=1&ln=on&ci=tip&name=doc%2FInitStubs.3]
J foundin 8.6\s-\s9.0
J is_private 0
J login oehhar
J priority 5\sMedium
J private_contact 0f366eb3e9e2fcab52b8ebacd197db9047186a5f
J resolution None
J severity Minor
J status Open
J submitter oehhar
J subsystem 70.\sSample\sExtension
J title Tcl_InitStubs:\sis\sthe\s"-"\sin\sthe\sversion\srequirement\s"8.5-"\sallowed?
J type Bug
K 70f3b23caddc1a1cf77a3f7ed7daa6f9f6405ee5
U oehhar
Z 5b547db8ab2fb16aab8a48d5b988316b