Re: [TCLCORE] Why does Tcl export private functions not in the Stubs table?
by Donal K. Fellows other posts by this author
Oct 28 2004 12:57AM messages near this date
Re: [TCLCORE] Why does Tcl export private functions not in the Stubs table?
|
Re: [TCLCORE] Why does Tcl export private functions not in the Stubs table?
David Gravereaux wrote:
> Here's the only sticky part I know of... It concerns all of the
> Tcl_(Obj)CmdProcs. I personally feel they should all be placed in the public
> Stubs table rather than not exported. [Incr Tk] needed that for [Incr Tcl]. I
> forget which function it needed, but [Incr Tk] called one (or maybe it was 2) of
> the [Incr Tcl] Tcl_ObjCmdProcs directly. We can easily acquire the address of
> the functions with Tcl_GetCommandInfo() though. I can go either way on that
> actually.
The command implementations categorically should not be exported.
Indeed, I'd characterize the direct calling of one module's ObjCmdProc
by another module as a bug (there is no general way to actually know
what a command is actually implemented with; any user can overlay a
procedure on top of a command, e.g. to do extra processing or analysis.)
The correct thing to do is to call Tcl_EvalObjv() instead, which takes
care of all this for you.
Donal.
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core
Thread:
Kevin Kenny
David Gravereaux
Donal K. Fellows
Michael Kirkham
Joe English
David Gravereaux
|