Am 26.05.2005 um 12:53 schrieb Andrew Piskorski:
Well, Zoran, you're looking at the code and I'm not, but none of that seems to jive with what Jeff H. has said before. So if you are serious about maybe working on this stuff (yeah!), I recommend talking to him and getting lots more details...
The Tcl_CloneInterp() is just as simple as: walk over the namespaces get all procs/commands copy them to target interp (copy clientData ptr of commands) get all vars copy them to target (sharing instead of deep-copying Tcl_Objs) and some other small plumbing here/there (errorInfo, errorCode, math functions). It is really no rocket science. The clientData ptr copy is a problem. This is not solvable w/o redefining the Tcl command struct to hold the clientDataDup call. The sharing instead of deep-copying Tcl_Objs is MT-issue which can be solved generally by getting the string rep of the Tcl_Obj and copying the string rep only but maintaining the object type. As you see, this is nothing very fancy. Yet, I doubt it will be acceptable speedwise, being it in C or not. Again, if people are willing to change the *model* of the app (never use global/namespace vars w/o proc-wrappers, never have those wrappers *modify* master-interp data, etc) then all sorts of things can be arranged. I'm not that convinced that this all is worth doing *now*, although I must say if I'm about to make this from *scratch*, then I'd do it this way. Zoran -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.