Menu

#51 constify Itcl stub table

open
None
5
2011-07-23
2011-07-23
No

Since Tcl/Tk 8.6, all stub tables are const, which means that the
compiler/linker protects them from being modified, It also means
that startup is faster, because during initialization no copy needs
to be made for each running Itcl instance: there is only one copy
of the stub tables which is shared by all instances.

The attached patch brings Itcl 4.0 up to date with Tcl 8.6 in
this respect, in the following way:
- copied ttkGenStubs.tcl from Tk8.6 to Itcl's tools/genStubs.tcl.
- Adds "const" in some places, to make the compiler happy.

ttkGenStubs.tcl comes originally from the same source
as tools/genStubs.tcl from Itcl 4, but has the following
improvements:
- constify the stub tables
- remove some unneeded #ifdef'ery
- better formatting of itcl*Decls.h
Apart from that, it is fully compatible and has all
features of tools/genStubs.tcl, so it is almost a
perfect replacement.

Regards,
Jan Nijtmans

Discussion

  • Jan Nijtmans

    Jan Nijtmans - 2011-07-23

    constify stub tables

     
  • Jan Nijtmans

    Jan Nijtmans - 2011-07-23
    • assigned_to: nobody --> wiede
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.