Overview
| Artifact ID: | 2f002363c0327ed99aa91de40c6f45cc397b145b |
|---|---|
| Ticket: | 803489ffffffffffffffffffffffffffffffffff
Tcl_FindNamespace problem in the Stubs table |
| User & Date: | dgp on 2003-09-12 00:05:44 |
Changes
- icomment:
Logged In: YES user_id=80530 Well, I understand why it's desirable for an extension author to have both things: 1) Use of the latest Tcl for himself; 2) Support for the earliest Tcl possible used by the users of his compiled, stub-enabled extensions. It's a bit less clear to me, given your talk of changing struct sizes whether support is 100% feasible. Even less so if we're talking about extensions that intrude into the Tcl internals. (for example, http://mini.net/tcl/3708 ) Another thing that's clear to me is that we are suffering from bad decisions made long ago, by none of us, so we could benefit from a lot of mutual patience looking into this. There's an extra complexity here that, technically, until TIP 139, Tcl_FindNamespace has been a private interface, and we've been fairly ruthless about dropping compatibility of private interfaces at minor releases. So the current HEAD is justifiable. From that perspecitve, extensions that call the newly public Tcl_FindNamespace should just be sure to Tcl_InitStubs(interp, "8.5", 0); because Tcl_FindNamespace first appears in Tcl 8.5. That said, Tcl_FindNamespace and friends are used by many good and faithful Tcl'ers, and Tcl extensions, and it's worthwhile to find a better way to accomodate them if we can. Technically, this seems similar to the issues in TIP 27 (CONSTification). A symbol is defined in two consecutive releases of Tcl to mean different things, and we have compatibility problems with people who did not expect it to change. Seems we could adopt a compatibility support simlar to the TIP 27 compatibility support. with a USE_PRIVATE_NAMESPACE_API macro, that when #define 'd, would suppress the definition of the newly exposed and not re-named routines by tcl.h, so that they'd be available for definition by tclInt.h for those naughy extensions that are #include-ing it. The default would be to not #define USE_PRIVATE_NAMESPACE_API, and the new Namespace routines would have their new, and future definitions, of pointing into the public stub table. Default operation ought to be the recommend usage going forward, not looking back.
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "5 Medium"
- username: "dgp"