summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-11 09:51:01 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-11 09:51:01 (GMT)
commit0e5b62601e1b369ad78f4eee43d473e74702cbd6 (patch)
treee608d2723552872785a3a140b3d4098636edfeae /generic
parent1d53b374aa101c0a5fe079f6e1ead45b64204af9 (diff)
downloadtk-0e5b62601e1b369ad78f4eee43d473e74702cbd6.zip
tk-0e5b62601e1b369ad78f4eee43d473e74702cbd6.tar.gz
tk-0e5b62601e1b369ad78f4eee43d473e74702cbd6.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. Remove unused TCLPATCHL, it should be ".0" for all final releases.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkConsole.c10
-rw-r--r--generic/tkTest.c4
-rw-r--r--generic/tkTextWind.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index 7d9da77..e93c0fc 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -444,7 +444,7 @@ Tk_CreateConsoleWindow(interp)
}
Tcl_Preserve((ClientData) consoleInterp);
- result = Tcl_GlobalEval(consoleInterp, initCmd);
+ result = Tcl_EvalEx(consoleInterp, initCmd, -1, TCL_EVAL_GLOBAL);
if (result == TCL_ERROR) {
Tcl_Obj *objPtr = Tcl_GetVar2Ex(consoleInterp, "errorCode", NULL,
TCL_GLOBAL_ONLY);
@@ -548,7 +548,7 @@ ConsoleOutput(instanceData, buf, toWrite, errorCode)
Tcl_DStringFree(&ds);
Tcl_IncrRefCount(cmd);
- Tcl_GlobalEvalObj(consoleInterp, cmd);
+ Tcl_EvalObjEx(consoleInterp, cmd, TCL_EVAL_GLOBAL);
Tcl_DecrRefCount(cmd);
}
}
@@ -754,7 +754,7 @@ ConsoleObjCmd(clientData, interp, objc, objv)
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);
if (result == TCL_ERROR) {
Tcl_Obj *objPtr = Tcl_GetVar2Ex(consoleInterp, "errorCode",
NULL, TCL_GLOBAL_ONLY);
@@ -830,7 +830,7 @@ InterpreterObjCmd(clientData, interp, objc, objv)
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?
*/
@@ -973,7 +973,7 @@ ConsoleEventProc(clientData, eventPtr)
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) {
diff --git a/generic/tkTest.c b/generic/tkTest.c
index 78496e6..e8d8d88 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.c
@@ -410,7 +410,7 @@ CBindingEvalProc(clientData, interp, eventPtr, tkwin, keySym)
cbindPtr = (CBinding *) clientData;
- return Tcl_GlobalEval(interp, cbindPtr->command);
+ return Tcl_EvalEx(interp, cbindPtr->command, -1, TCL_EVAL_GLOBAL);
}
static void
@@ -420,7 +420,7 @@ CBindingFreeProc(clientData)
CBinding *cbindPtr = (CBinding *) clientData;
if (cbindPtr->delete != NULL) {
- Tcl_GlobalEval(cbindPtr->interp, cbindPtr->delete);
+ Tcl_EvalEx(cbindPtr->interp, cbindPtr->delete, -1, TCL_EVAL_GLOBAL);
ckfree((char *) cbindPtr->delete);
}
ckfree((char *) cbindPtr->command);
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c
index 9f2582e..999febe 100644
--- a/generic/tkTextWind.c
+++ b/generic/tkTextWind.c
@@ -769,7 +769,7 @@ EmbWinLayoutProc(textPtr, indexPtr, ewPtr, offset, maxX, maxChars,
* the window.
*/
- code = Tcl_GlobalEval(textPtr->interp, ewPtr->body.ew.create);
+ code = Tcl_EvalEx(textPtr->interp, ewPtr->body.ew.create, -1, TCL_EVAL_GLOBAL);
if (code != TCL_OK) {
createError:
Tcl_BackgroundError(textPtr->interp);