summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-15 17:25:24 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-15 17:25:24 (GMT)
commitd3463815d861cc5be6f89b23dc95b28e7e6f4c41 (patch)
tree69cef9ca507b21a3b686d1995204ce758e178b23
parent1998012375429e5bbf900e262657b95759674f64 (diff)
parent7a6a77955225006567252f9b76f90cafb12d56a8 (diff)
downloadtk-d3463815d861cc5be6f89b23dc95b28e7e6f4c41.zip
tk-d3463815d861cc5be6f89b23dc95b28e7e6f4c41.tar.gz
tk-d3463815d861cc5be6f89b23dc95b28e7e6f4c41.tar.bz2
merge core-8-5-branch
-rw-r--r--generic/tkConsole.c4
-rw-r--r--generic/tkInt.h5
-rw-r--r--generic/tkMain.c4
-rw-r--r--generic/tkUtil.c34
-rw-r--r--generic/tkWindow.c10
-rw-r--r--generic/ttk/ttkScroll.c2
-rw-r--r--generic/ttk/ttkScrollbar.c2
-rw-r--r--tests/font.test3
8 files changed, 48 insertions, 16 deletions
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index 621d125..f894638 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -220,11 +220,11 @@ Tk_InitConsoleChannels(
Tcl_Channel consoleChannel;
/*
- * Ensure that we are getting the matching version of Tcl. This is really
+ * Ensure that we are getting a compatible version of Tcl. This is really
* only an issue when Tk is loaded dynamically.
*/
- if (Tcl_InitStubs(interp, "8.5", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5.0", 0) == NULL) {
return;
}
diff --git a/generic/tkInt.h b/generic/tkInt.h
index 9a36e1e..69d08e2 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -1203,6 +1203,11 @@ MODULE_SCOPE int TkUnsupported1ObjCmd(ClientData clientData,
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
+MODULE_SCOPE int Tk_VarEval(Tcl_Interp *interp, ...);
+
+#undef Tcl_VarEval
+#define Tcl_VarEval Tk_VarEval
+
#endif /* _TKINT */
/*
diff --git a/generic/tkMain.c b/generic/tkMain.c
index 695ba95..e95f7a3 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -136,11 +136,11 @@ Tk_MainEx(
Tcl_DString appName;
/*
- * Ensure that we are getting the matching version of Tcl. This is really
+ * Ensure that we are getting a compatible version of Tcl. This is really
* only an issue when Tk is loaded dynamically.
*/
- if (Tcl_InitStubs(interp, "8.5", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5.0", 0) == NULL) {
abort();
}
diff --git a/generic/tkUtil.c b/generic/tkUtil.c
index 2a8240b..f1c2117 100644
--- a/generic/tkUtil.c
+++ b/generic/tkUtil.c
@@ -1058,6 +1058,40 @@ TkBackgroundEvalObjv(
return r;
}
+int
+Tk_VarEval(
+ Tcl_Interp *interp,
+ ...)
+{
+ Tcl_DString buf;
+ char *string;
+ int result;
+ va_list argList;
+
+ va_start(argList, interp);
+
+ /*
+ * Copy the strings one after the other into a single larger string. Use
+ * stack-allocated space for small commands, but if the command gets too
+ * large than call ckalloc to create the space.
+ */
+
+ Tcl_DStringInit(&buf);
+ while (1) {
+ string = va_arg(argList, char *);
+ if (string == NULL) {
+ break;
+ }
+ Tcl_DStringAppend(&buf, string, -1);
+ }
+
+ result = Tcl_Eval(interp, Tcl_DStringValue(&buf));
+ Tcl_DStringFree(&buf);
+ va_end(argList);
+
+ return result;
+}
+
/*
* Local Variables:
* mode: c
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 417d16b..ac69455 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -3021,11 +3021,10 @@ Initialize(
ThreadSpecificData *tsdPtr;
/*
- * 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, "8.5", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5.0", 0) == NULL) {
return TCL_ERROR;
}
@@ -3257,11 +3256,6 @@ Initialize(
geometry = NULL;
}
- if (Tcl_PkgRequire(interp, "Tcl", "8.5", 0) == NULL) {
- code = TCL_ERROR;
- goto done;
- }
-
/*
* Provide Tk and its stub table.
*/
diff --git a/generic/ttk/ttkScroll.c b/generic/ttk/ttkScroll.c
index defe05a..67ee8a5 100644
--- a/generic/ttk/ttkScroll.c
+++ b/generic/ttk/ttkScroll.c
@@ -34,7 +34,7 @@
* TtkScrollbarUpdateRequired, which will invoke step (5) (@@@ Fix this)
*/
-#include <tk.h>
+#include <tkInt.h>
#include "ttkTheme.h"
#include "ttkWidget.h"
diff --git a/generic/ttk/ttkScrollbar.c b/generic/ttk/ttkScrollbar.c
index 5b0c212..05ec435 100644
--- a/generic/ttk/ttkScrollbar.c
+++ b/generic/ttk/ttkScrollbar.c
@@ -4,7 +4,7 @@
* ttk::scrollbar widget.
*/
-#include <tk.h>
+#include <tkInt.h>
#include "ttkTheme.h"
#include "ttkWidget.h"
diff --git a/tests/font.test b/tests/font.test
index 34e4b83..82af541 100644
--- a/tests/font.test
+++ b/tests/font.test
@@ -46,10 +46,9 @@ proc csetup {{str ""}} {
setup
-case [tk windowingsystem] {
+switch [tk windowingsystem] {
x11 {set fixed "fixed"}
win32 {set fixed "courier 12"}
- classic -
aqua {set fixed "monaco 9"}
}