diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-03-28 20:52:35 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-03-28 20:52:35 (GMT) |
commit | e8e7449d29716dbc5b1e6ed25d6af90e04c18249 (patch) | |
tree | d3ccf84a64c98b4c1cd9195d3d812ea68e9988e6 | |
parent | 34916714c2a78b655ee536afe9b482c8161ae0e3 (diff) | |
download | tk-e8e7449d29716dbc5b1e6ed25d6af90e04c18249.zip tk-e8e7449d29716dbc5b1e6ed25d6af90e04c18249.tar.gz tk-e8e7449d29716dbc5b1e6ed25d6af90e04c18249.tar.bz2 |
Demonstrate how the Tk_Main() macro can use Tcl_InitSubsystems(), as fully equivalent replacement of Tcl_FindExecutable/Tcl_CreateInterp. (not part of TIP #414)initsubsystems2
-rw-r--r-- | generic/tk.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tk.h b/generic/tk.h index aa9cd22..5b79e5a 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -1498,10 +1498,10 @@ typedef struct Tk_ElementSpec { /* Removed Tk_Main, use macro instead */ #if defined(__WIN32__) || defined(__CYGWIN__) #define Tk_Main(argc, argv, proc) Tk_MainEx(argc, argv, proc, \ - (Tcl_FindExecutable(0), (Tcl_CreateInterp)())) + (Tcl_InitSubsystems(TCL_INIT_CREATE, 0, NULL))) #else #define Tk_Main(argc, argv, proc) Tk_MainEx(argc, argv, proc, \ - (Tcl_FindExecutable(argv[0]), (Tcl_CreateInterp)())) + (Tcl_InitSubsystems(TCL_INIT_CREATE, 0, argv))) #endif const char * Tk_InitStubs(Tcl_Interp *interp, const char *version, int exact); |