Overview
| Artifact ID: | f4278ae50f4c04d8d2c552081c8bfb5393c35e47 |
|---|---|
| Ticket: | 3588687fffffffffffffffffffffffffffffffff
Tcl_InitStubs() Broken As Designed |
| User & Date: | jenglish on 2012-11-28 07:52:43 |
Changes
- icomment:
I don't think that this part does what it claims to do: 90 /* 91 * Detect whether the extension and the stubs library were built 92 * against Tcl header files from different major versions. That's 93 * seriously broken. 94 */ If an extension was compiled against 8.5.13 headers with -DUSE_TCL_STUBS (where Tcl_InitStubs is declared as a symbol with external linkage) but mistakenly linked against novem libtclstub.a, it'll get novem's definition of Tcl_InitStubs(), which passes novem's TCL_VERSION_MAJOR to the worker routine TclInitStubs(). Suggest simply leaving Tcl_InitStubs out of novem tclStubLib.c. That way the extension will get a linker error if there is a mismatch (old headers+new libtclstub => Tcl_InitStubs not found; new headers+old libtclstub => TclInitStubs not found). The change could be backported to core-8-5-branch and core-8-6-branch, but that would just change a link-time error into a runtime one -- probably not worth doing (if there's a mismatch, it's better to detect it earlier).
- login: "jenglish"
- mimetype: "text/plain"
- username: "jenglish"