summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-22 21:28:22 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-22 21:28:22 (GMT)
commit750aa60ea814165cdb06294410022682bf734286 (patch)
tree96abd7eec5de1385bbc642a9361ddd421ece344f /generic
parentd68ebc949ff65561393bce4e9c6357623a402cf9 (diff)
parent4d6857c9421633368b12903cd5ce41647eddbc97 (diff)
downloadtk-750aa60ea814165cdb06294410022682bf734286.zip
tk-750aa60ea814165cdb06294410022682bf734286.tar.gz
tk-750aa60ea814165cdb06294410022682bf734286.tar.bz2
Bug [3601782]: Produce a nice error-message when the first Tcl_InitStubs() fails, in stead of simply abort()
Diffstat (limited to 'generic')
-rw-r--r--generic/tkConsole.c5
-rw-r--r--generic/tkMain.c11
-rw-r--r--generic/tkWindow.c2
3 files changed, 10 insertions, 8 deletions
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index d7a6261..684c9aa 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -220,11 +220,10 @@ Tk_InitConsoleChannels(
Tcl_Channel consoleChannel;
/*
- * Ensure that we are getting a compatible 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.6.0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.6", 0) == NULL) {
return;
}
diff --git a/generic/tkMain.c b/generic/tkMain.c
index 3171ebf..86f955a 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -184,12 +184,15 @@ Tk_MainEx(
InteractiveState is;
/*
- * Ensure that we are getting a compatible 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.6.0", 0) == NULL) {
- abort();
+ if (Tcl_InitStubs(interp, "8.6", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
+ abort();
+ } else {
+ Tcl_Panic("%s", Tcl_GetStringResult(interp));
+ }
}
#if defined(__WIN32__) && !defined(__WIN64__) && !defined(UNICODE) && !defined(STATIC_BUILD)
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 37b54c0..6b908dc 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -3050,7 +3050,7 @@ Initialize(
* Ensure that we are getting a compatible version of Tcl.
*/
- if (Tcl_InitStubs(interp, "8.6.0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.6", 0) == NULL) {
return TCL_ERROR;
}