From: Jeff Hobbs <jeffh@ActiveState.com> - 2005-07-22 23:04:55
I've been looking through some Tk Mac OS X initialization stuff
with the need to make some correction (add some more private
vars that modify Aqua drawing behaviors).
In going through this, I see several instances of oversimplified
use of Tcl_LinkVar and general initialization. In
macosx/tkMacOSXInit.c:TkpInit, there is a proc-static (global)
var controlling the bulk of the initialization. This means that
those functions only get called for the first Tk interpreter.
OK, that may be right ... but I suspect that it isn't always.
While Tk runs in multiple interps on Aqua, you don't get the
bulk of ::tk::mac::* variables that control behavior. In some
instances, that is just as well, as the behavior is globally
controlled anyways, but I think the code needs a review to
evaluate what should and shouldn't be per-interp, global, and
While I mention this about OS X, it shouldn't be assumed that
other platforms are OK, just that I was looking at OS X this
time around. Anybody poking into the core should keep this in
mind next time they want to fiddle with linked vars, interp
specific data, etc.