summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-31 10:01:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-31 10:01:21 (GMT)
commitc280ebcafcb45b2fb405703d10d2a8b93c377ca7 (patch)
tree17fa89a05b21e42d5fbac3201eade0cdfc620cd1 /generic
parent9cfbd3e51461d673752779dc1a09e8011a701846 (diff)
downloadtk-c280ebcafcb45b2fb405703d10d2a8b93c377ca7.zip
tk-c280ebcafcb45b2fb405703d10d2a8b93c377ca7.tar.gz
tk-c280ebcafcb45b2fb405703d10d2a8b93c377ca7.tar.bz2
Change expectation of safe-5.1 (error-message changed in Tcl)
Don't use Tcl_GetMaster() any more, use Tcl_GetParent() in stead. With fallback for Tcl < 8.6.11.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkInt.h5
-rw-r--r--generic/tkWindow.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/generic/tkInt.h b/generic/tkInt.h
index 2f64f99..23605cf 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -84,6 +84,11 @@
# endif
#endif
+
+#ifndef Tcl_GetParent
+# define Tcl_GetParent Tcl_GetMaster
+#endif
+
/*
* Macros used to cast between pointers and integers (e.g. when storing an int
* in ClientData), on 64-bit architectures they avoid gcc warning about "cast
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index a67329c..5e5e836 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -3094,7 +3094,7 @@ Initialize(
Tcl_Interp *parent = interp;
while (Tcl_IsSafe(parent)) {
- parent = Tcl_GetMaster(parent);
+ parent = Tcl_GetParent(parent);
if (parent == NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"no controlling parent interpreter", -1));