summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tk.h10
-rw-r--r--generic/tkBind.c2
-rw-r--r--generic/tkConsole.c13
-rw-r--r--generic/tkMain.c2
-rw-r--r--generic/tkTest.c4
-rw-r--r--generic/tkTextWind.c4
-rw-r--r--generic/tkWindow.c4
-rw-r--r--generic/ttk/ttkTheme.c2
8 files changed, 25 insertions, 16 deletions
diff --git a/generic/tk.h b/generic/tk.h
index 8c13df2..f1f81cd 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -17,10 +17,18 @@
#define _TK
#include <tcl.h>
-#if (TCL_MAJOR_VERSION != 8) || (TCL_MINOR_VERSION != 5)
+#if (TCL_MAJOR_VERSION != 8) || (TCL_MINOR_VERSION < 5)
# error Tk 8.5 must be compiled with tcl.h from Tcl 8.5
#endif
+#ifndef _ANSI_ARGS_
+# ifndef NO_PROTOTYPES
+# define _ANSI_ARGS_(x) x
+# else
+# define _ANSI_ARGS_(x) ()
+# endif
+#endif
+
/*
* For C++ compilers, use extern "C"
*/
diff --git a/generic/tkBind.c b/generic/tkBind.c
index 21bfb5c..8d20fa9 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -4595,7 +4595,7 @@ TkKeysymToString(
*
* TkCopyAndGlobalEval --
*
- * This function makes a copy of a script then calls Tcl_GlobalEval to
+ * This function makes a copy of a script then calls Tcl_EvalEx to
* evaluate it. It's used in situations where the execution of a command
* may cause the original command string to be reallocated.
*
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index b10aaaf..621d125 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.5", 0) == NULL) {
return;
}
@@ -436,7 +436,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 +529,7 @@ ConsoleOutput(
Tcl_DStringFree(&ds);
Tcl_IncrRefCount(cmd);
- Tcl_GlobalEvalObj(consoleInterp, cmd);
+ Tcl_EvalObjEx(consoleInterp, cmd, TCL_EVAL_GLOBAL);
Tcl_DecrRefCount(cmd);
}
}
@@ -732,7 +733,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 +795,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 +930,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) {
diff --git a/generic/tkMain.c b/generic/tkMain.c
index 3be7189..74b8557 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -136,7 +136,7 @@ Tk_MainEx(
* only an issue when Tk is loaded dynamically.
*/
- if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5", 0) == NULL) {
abort();
}
diff --git a/generic/tkTest.c b/generic/tkTest.c
index 307ca34..9fe2222 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.c
@@ -400,7 +400,7 @@ CBindingEvalProc(
cbindPtr = (CBinding *) clientData;
- return Tcl_GlobalEval(interp, cbindPtr->command);
+ return Tcl_EvalEx(interp, cbindPtr->command, -1, TCL_EVAL_GLOBAL);
}
static void
@@ -410,7 +410,7 @@ CBindingFreeProc(
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 5dc8feb..8d1f850 100644
--- a/generic/tkTextWind.c
+++ b/generic/tkTextWind.c
@@ -902,10 +902,10 @@ EmbWinLayoutProc(
if (dsPtr != NULL) {
Tcl_DStringAppend(dsPtr, before, (int) (string-before));
- code = Tcl_GlobalEval(textPtr->interp, Tcl_DStringValue(dsPtr));
+ code = Tcl_EvalEx(textPtr->interp, Tcl_DStringValue(dsPtr), -1, TCL_EVAL_GLOBAL);
Tcl_DStringFree(dsPtr);
} else {
- 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:
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 995f71f..417d16b 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -3025,7 +3025,7 @@ Initialize(
* only an issue when Tk is loaded dynamically.
*/
- if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5", 0) == NULL) {
return TCL_ERROR;
}
@@ -3257,7 +3257,7 @@ Initialize(
geometry = NULL;
}
- if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 0) == NULL) {
+ if (Tcl_PkgRequire(interp, "Tcl", "8.5", 0) == NULL) {
code = TCL_ERROR;
goto done;
}
diff --git a/generic/ttk/ttkTheme.c b/generic/ttk/ttkTheme.c
index 5095487..a2c51c0 100644
--- a/generic/ttk/ttkTheme.c
+++ b/generic/ttk/ttkTheme.c
@@ -509,7 +509,7 @@ static void ThemeChangedProc(ClientData clientData)
static char ThemeChangedScript[] = "ttk::ThemeChanged";
StylePackageData *pkgPtr = clientData;
- if (Tcl_GlobalEval(pkgPtr->interp, ThemeChangedScript) != TCL_OK) {
+ if (Tcl_EvalEx(pkgPtr->interp, ThemeChangedScript, -1, TCL_EVAL_GLOBAL) != TCL_OK) {
Tcl_BackgroundError(pkgPtr->interp);
}
pkgPtr->themeChangePending = 0;