Overview
| Artifact ID: | 4ff38f1db1f65d76da44d34b1f3489a98b00a358 |
|---|---|
| Ticket: | 1711975fffffffffffffffffffffffffffffffff
Tcl_MainEx() (like Tk_MainEx()) |
| User & Date: | nijtmans on 2010-07-09 16:18:59 |
Changes
- icomment:
This is related to: <https://sourceforge.net/tracker/?func=detail&atid=310894&aid=1055668&group_id=10894> =================================================================== Comment By: Joe English (jenglish) Date: 2004-10-28 20:58 Message: Logged In: YES user_id=68433 Currently, to build a version-independent shell that dynamically loads Tcl, you can use: + hTcl = LoadLibrary(...path to tcl8X.dll...) + tclMainPtr = GetProcAddress(hTcl, "Tcl_Main") + (*tclMainPtr)(argv,argc, yourAppInitProc); In the scheme you propose, you would instead: + hTcl = LoadLibrary( .... ) + tclCreateInterpPtr = GetProcAddress(hTcl, "Tcl_CreateInterp"); + tempInterp = (*tclCreateInterpPtr)(...); + Tcl_InitStubs(tempInterp); + Tcl_DeleteInterp(tempInterp) + Call Tcl_Main() through the stubs table. This is more complicated, less perspicuous, and isn't even version-independant since it would only work for versions of the core where Tcl_Main is in the stubs table. How is the second one an improvement? I just don't see it. ========== end of jenglish citation =========== My remark. After this patch, this would become: + hTcl = LoadLibrary( .... ) + tclCreateInterpPtr = GetProcAddress(hTcl, "Tcl_CreateInterpEx"); + tclMainExPtr = GetProcAddress(hTcl, "Tcl_MainEx"); + interp = (*tclCreateInterpPtr)(...); + tclMainExPtr(...., interp); Yes, it's a little bit more compilcated than before, but at least it's the same for Tcl and Tk.
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"