Overview
| Artifact ID: | baddd29b7596a5c899d53fdfc15d1f16106edc730d046a1c69f6a2e239c0e8ed |
|---|---|
| Ticket: | 70f3b23caddc1a1cf77a3f7ed7daa6f9f6405ee5
Tcl_InitStubs: is the "-" in the version requirement "8.5-" allowed? |
| User & Date: | apnadkarni on 2025-01-07 03:05:10 |
Changes
- icomment:
To clarify, what I was trying to say is that I saw no use for the version parameter. In my view the argument passed to `Tcl_InitStubs` should always be `TCL_VERSION` and never a hardcoded "8.6" or similar. And this has nothing to do with Tcl 8 vs 9. It ensures that any attempt to load an extension into a version of Tcl older than the one against which it is built will fail. For example, the extension might say `Tcl_InitStubs(..., "8.5",...)` but then be built against Tcl 8.6. That binary built against 8.6 should not be loadable into 8.5. No matter the programmer's claim that it only uses 8.5 stubs functions. Even if that was the case when initially written, over time as the extension evolves, 8.6 stubs might be called. The whole purpose is to protect against inadvertent programmer errors and hardcoding "8.5" defeats that purpose. Put it differently, the `Tcl_InitStubs` call should not have had a version parameter at all. It should have just used `TCL_VERSION` in it's internal checks. It's too late to change now, but the advice should be to always just pass `TCL_VERSION` to the function.
- login: "apnadkarni"
- mimetype: "text/x-markdown"