Overview
| Artifact ID: | 8f96a0a5b5f0aba22e1cb295c0587f1c51051932 |
|---|---|
| Ticket: | 1578344fffffffffffffffffffffffffffffffff
-exact version matching broken |
| User & Date: | dgp on 2007-05-29 22:56:02 |
Changes
- icomment:
Logged In: YES user_id=80530 Originator: YES I think these patches do the right thing. They provide compatible support for the sensible historic ways to call Tcl_InitStubs(): Tcl_InitStubs(i, TCL_VERSION, 1) This would be called to get a Tcl stubs table from the same TCL_VERSION series as was used to compile the extension. With this patch, that same meaning is maintained, without the need to damage the compatibility of what [package require -exact] has always meant. Tcl_InitStubs(i, TCL_VERSION, 0) would get a stub table from the same TCL_VERSION series as was used to compile the extension, or from any compatible later version. Again this patch does the same thing when called in the same way. In addition, this patch permits some other cases identified by jenglish to be addressed for the first time. Tcl_InitStubs(i, TCL_PATCH_LEVEL, 0) can be used to set a more discriminating floor on the set of acceptable stub tables, so that, say, stub tables from only Tcl 8.5.2 and later would be accepted, and attempts to call in a Tcl 8.5.0 interp would fail. Tcl_InitStubs(i, TCL_PATCH_LEVEL, 1) could be used to demand lockstep requirement for a stub table from a single release of Tcl. I tend to dismiss this a lot, since it counters the multiple version capabilities provided by stubs. But there can be other reasons to use stubs (getting an architecture suitable for starkit inclusion, for instance), and from a strict perspective of "support only what I test", this can be a useful tool for some developers and some needs. There are some other more complex requirement needs that cannot be expressed with a single Tcl_InitStubs() call even with this patch in place, but I really cannot imagine completely addressing those without an entirely new interface routine. There more complex requirements *can* be resolved with this patch, if one uses Tcl_InitStubs() to first get an 8.5a7 stubs table, and then make a call to Tcl_PkgRequireProc() to make a requirements test with the full power and generality of the TIP 268 enhanced [package require] command.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"