diff options
Diffstat (limited to 'generic/tkConsole.c')
-rw-r--r-- | generic/tkConsole.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tkConsole.c b/generic/tkConsole.c index b10aaaf..2cd2632 100644 --- a/generic/tkConsole.c +++ b/generic/tkConsole.c @@ -220,11 +220,10 @@ Tk_InitConsoleChannels( Tcl_Channel consoleChannel; /* - * Ensure that we are getting the matching version of Tcl. This is really - * only an issue when Tk is loaded dynamically. + * Ensure that we are getting a compatible version of Tcl. */ - if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { + if (Tcl_InitStubs(interp, "8.5.0", 0) == NULL) { return; } @@ -436,7 +435,8 @@ Tk_CreateConsoleWindow( } Tcl_Preserve((ClientData) consoleInterp); - result = Tcl_GlobalEval(consoleInterp, "source $tk_library/console.tcl"); + result = Tcl_EvalEx(consoleInterp, "source $tk_library/console.tcl", + -1, TCL_EVAL_GLOBAL); if (result == TCL_ERROR) { Tcl_SetReturnOptions(interp, Tcl_GetReturnOptions(consoleInterp, result)); @@ -528,7 +528,7 @@ ConsoleOutput( Tcl_DStringFree(&ds); Tcl_IncrRefCount(cmd); - Tcl_GlobalEvalObj(consoleInterp, cmd); + Tcl_EvalObjEx(consoleInterp, cmd, TCL_EVAL_GLOBAL); Tcl_DecrRefCount(cmd); } } @@ -732,7 +732,7 @@ ConsoleObjCmd( Tcl_IncrRefCount(cmd); if (consoleInterp && !Tcl_InterpDeleted(consoleInterp)) { Tcl_Preserve((ClientData) consoleInterp); - result = Tcl_GlobalEvalObj(consoleInterp, cmd); + result = Tcl_EvalObjEx(consoleInterp, cmd, TCL_EVAL_GLOBAL); Tcl_SetReturnOptions(interp, Tcl_GetReturnOptions(consoleInterp, result)); Tcl_SetObjResult(interp, Tcl_GetObjResult(consoleInterp)); @@ -794,7 +794,7 @@ InterpreterObjCmd( Tcl_Preserve((ClientData) otherInterp); switch ((enum option) index) { case OTHER_EVAL: - result = Tcl_GlobalEvalObj(otherInterp, objv[2]); + result = Tcl_EvalObjEx(otherInterp, objv[2], TCL_EVAL_GLOBAL); /* * TODO: Should exceptions be filtered here? */ @@ -929,7 +929,7 @@ ConsoleEventProc( Tcl_Interp *consoleInterp = info->consoleInterp; if (consoleInterp && !Tcl_InterpDeleted(consoleInterp)) { - Tcl_GlobalEval(consoleInterp, "tk::ConsoleExit"); + Tcl_EvalEx(consoleInterp, "tk::ConsoleExit", -1, TCL_EVAL_GLOBAL); } if (--info->refCount <= 0) { |