|
From: Joe E. <jen...@fl...> - 2010-02-17 05:49:57
|
Jan Nijtmans wrote: > OK, thanks! Well, this revertion was in fact my attempt of > streamlining genStubs.tcl > with ttkGenStubs.tcl ([2010-02-05]), but this was together with more > const-changes, which were reverted by Joe the same day. The name change > from ttk*Stubs to ttk*ConstStubs in my patch were reverted as well in > this commit. > > My impression was that the important symbols which caused problems in the > past were tcl*StubsPtr, the same one initialized by the stub library: Having > the same symbol in libtcl.so as in libtclstub.a, that's the problematic thing > > However, the tclStubs symbol is not present in libtclstub.a, and in > addition, this symbol is made "const" now, so I don't think it can > cause any problem any more. Besides, it's only the main stub table > that's MODULE_SCOPE, the others are still static. tclStubs (the record) has never been present in libtclstub.a. The stub library has only ever contained definitions for tclStubsPtr (the pointer), Tcl_InitStubs (the routine that initializes the pointer) and various support machinery. The tclStubs record has always been defined in the main library libtcl. Libtcl *used* to contain a second copy of tclStubsPtr (the pointer) and Tcl_InitStubs(). This was never necessary, was mostly harmless on most systems, but caused problems on others, which was why it was removed. The rule has always been: if you compile with -DUSE_TCL_STUBS, you must link with the stub library; if you compile without -DUSE_TCL_STUBS, you must link with the main library. Because historically libtcl contained a redundant second copy of tclStubsPtr and Tcl_InitStubs(), many build systems were able to work even when they didn't follow those rules. Removing the second redundant copy of tclStubsPtr from the main library caused those build systems to break, but it fixed things on platforms where the second redundant copy caused problems, which is why that was done. I don't know where all the extra Consts came from or why they were seen as necessary. The tile/ttk stub table pointer has always been declared 'const'. The stub table record lacks a const qualifier because it is passed to Tcl_PkgProvideEx(), which takes a "void *" (note no const). > However, I'm fine with changing the symbol names back to > (tcl|tk|ttk)*ConstStubs. Joe, can you agree with that? As long as you don't add any contravariant const qualifiers. I reverted the changes that caused compilation failures when compiled under 8.4. As noted in the commit message, Tile needs to work with 8.4 and I'd really prefer if the codebases could be kept relatively in sync. --Joe English jen...@fl... |