Overview
| Artifact ID: | c4c93d3317a14136b68e79cb7537f121705c2d1a |
|---|---|
| Ticket: | 1711975fffffffffffffffffffffffffffffffff
Tcl_MainEx() (like Tk_MainEx()) |
| User & Date: | nijtmans on 2010-07-09 15:44:10 |
Changes
- icomment:
allow_comments - 0 Re-opening, because maybe there is a way out of this! The reason I rejected this was because still Tcl_Main and Tk_Main were still not handled the same. But what if we introduce a macro Tcl_Main like: #define Tcl_Main(argc, argv, proc) \ Tcl_MainEx(argc, argv, proc, Tcl_CreateInterp()) The problem with this is that this would not work the same when defining TCL_USE_STUBS, because Tcl_CreateInterp then is supplied through the stub table which is not initialized yet. However, there is a solution for this: - Change Tcl_Main to Tcl_MainEx, adding an extra parameter Tcl_Interp - Change Tcl_CreateInterp to Tcl_CreateInterpEx, which is exactly the same. Those two functions don't need to be documented, because the Tcl_Main macro is the only supported use of those (just like Tk_Main). Finally, undefine the Tcl_CreateInterpEx macro, so this call will never go through the stub table. And provide a Tcl_CreateInterp macro, to make Tcl_CreateInterp work exactly as before. Here is the patch doing this. It does not have the problem in the original proposal, it really makes Tcl_Main work the same way as Tk_Main. - login: "nijtmans"
- mimetype: "text/plain"
- resolution changed to: "Accepted"
- status changed to: "Open"
- username: "nijtmans"