aboutsummaryrefslogtreecommitdiffstats
path: root/ext/tcltklib
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-09 18:35:52 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-09 18:35:52 +0000
commitcd84994255d9f33172021b1f74621fd93ff0c57a (patch)
treee8f29319f4b3bc3bb6b6dc28eff27c373ef2e149 /ext/tcltklib
parent3df602c018cabf965ebaaefd53ca0a9665428493 (diff)
downloadruby-cd84994255d9f33172021b1f74621fd93ff0c57a.tar.gz
* ext/tcltklib/tcltklib.c: fix SEGV when compiled with Tcl/Tk8.3.x or older
* ext/tk/lib/tkextlib/tile/style.rb: bug fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tcltklib')
-rw-r--r--ext/tcltklib/tcltklib.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c
index 765417d925..67958d7beb 100644
--- a/ext/tcltklib/tcltklib.c
+++ b/ext/tcltklib/tcltklib.c
@@ -3306,9 +3306,12 @@ delete_slaves(ip)
Tcl_Preserve(slave);
+#if TCL_MAJOR_VERSION < 8 || ( TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 4)
+#else
if (!Tcl_InterpDeleted(slave)) {
Tcl_Eval(slave, "foreach i [after info] { after cancel $i }");
}
+#endif
/* delete slaves of slave */
delete_slaves(slave);
@@ -3356,9 +3359,12 @@ ip_free(ptr)
Tcl_Eval(ptr->ip, finalize_hook_name);
}
+#if TCL_MAJOR_VERSION < 8 || ( TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 4)
+#else
if (!Tcl_InterpDeleted(ptr->ip)) {
Tcl_Eval(ptr->ip, "foreach i [after info] {after cancel $i}");
}
+#endif
del_root(ptr->ip);
@@ -3820,9 +3826,12 @@ ip_delete(self)
/* Tcl_Preserve(ptr->ip); */
rbtk_preserve_ip(ptr);
+#if TCL_MAJOR_VERSION < 8 || ( TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 4)
+#else
if (!Tcl_InterpDeleted(ptr->ip)) {
Tcl_Eval(ptr->ip, "foreach i [after info] { after cancel $i }");
}
+#endif
del_root(ptr->ip);