Overview
| Artifact ID: | e277e9b135bc360e4d85c92640a95d33bd1142c7 |
|---|---|
| Ticket: | 1938497fffffffffffffffffffffffffffffffff
Make stubs tables static const |
| User & Date: | das on 2008-04-09 10:39:56 |
Changes
- assignee changed to: "dgp"
- cmimetype changed to: "text/plain"
- comment changed to:
Further along the lines of stub cleanup: I see no good reason why the various stubs tables should not be 'static const' in both tcl and tk. 'static' because the only access outside of *StubInit.c that we need is a pointer to the main stub table for the Tcl_PkgProvideEx call (and for the interp init in the case of tcl); that pointer can be exported separately, no need for all the stub tables to be global because of that. 'const' because there is no need for the stubs tables to be modifiable, they can be in read-only memory. The only user of writable stubs tables is the gross Tcl_SetNotifier hack that relies on overwriting the notifier proc stub entries. As we cannot guarantee that the notifier procs are only called via stubs anyway, the builtin notifiers already all have to check whether they been hooked by comparing their stub entry against the default, so we might as well do away with the stubs table modification and check for hooked notifier via a global set by Tcl_SetNotifier. Please review the attached patches that make those changes.
- foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "das"
- subsystem changed to: "53. Configure and Build Tools"
- title changed to: "Make stubs tables static const"
- type changed to: "Patch"