summaryrefslogtreecommitdiffstats
path: root/generic/tkConsole.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-11 11:48:38 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-11 11:48:38 (GMT)
commitcfce00e636e389f48c32d61c5483a913a0a9d656 (patch)
treec9a801ef36f2cf95b58dcb55dd72e10ecfe02f67 /generic/tkConsole.c
parent6b32cafc8e54ed1a7bee854a77191c18186d905e (diff)
parentfa87897c16b0dc6d903c1be0dc80389d9cd072e3 (diff)
downloadtk-cfce00e636e389f48c32d61c5483a913a0a9d656.zip
tk-cfce00e636e389f48c32d61c5483a913a0a9d656.tar.gz
tk-cfce00e636e389f48c32d61c5483a913a0a9d656.tar.bz2
Eliminate all usage of deprecated Tcl_EvalObj, Tcl_GlobalEval and Tcl_GlobalEvalObj functions.
Add [file normalize] to pkgIndex.tcl, in order to prevent '..' in file paths.
Diffstat (limited to 'generic/tkConsole.c')
-rw-r--r--generic/tkConsole.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index 434350a..eb67fa4 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -224,7 +224,7 @@ Tk_InitConsoleChannels(
* only an issue when Tk is loaded dynamically.
*/
- if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.6", 0) == NULL) {
return;
}
@@ -439,7 +439,8 @@ Tk_CreateConsoleWindow(
}
Tcl_Preserve(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));
@@ -531,7 +532,7 @@ ConsoleOutput(
Tcl_DStringFree(&ds);
Tcl_IncrRefCount(cmd);
- Tcl_GlobalEvalObj(consoleInterp, cmd);
+ Tcl_EvalObjEx(consoleInterp, cmd, TCL_EVAL_GLOBAL);
Tcl_DecrRefCount(cmd);
}
}
@@ -741,7 +742,7 @@ ConsoleObjCmd(
Tcl_IncrRefCount(cmd);
if (consoleInterp && !Tcl_InterpDeleted(consoleInterp)) {
Tcl_Preserve(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));
@@ -807,7 +808,7 @@ InterpreterObjCmd(
Tcl_Preserve(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?
@@ -946,7 +947,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) {