diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-09 18:35:52 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-09 18:35:52 +0000 |
commit | 8c52b58b76e0bb5e7e56859f3fd96077941d7ce2 (patch) | |
tree | e8f29319f4b3bc3bb6b6dc28eff27c373ef2e149 | |
parent | ef5fb50fbf945c7f23c2bd0fa2ccde0d0410265d (diff) | |
download | ruby-8c52b58b76e0bb5e7e56859f3fd96077941d7ce2.tar.gz ruby-8c52b58b76e0bb5e7e56859f3fd96077941d7ce2.tar.xz ruby-8c52b58b76e0bb5e7e56859f3fd96077941d7ce2.zip |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@7239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ext/tcltklib/tcltklib.c | 9 | ||||
-rw-r--r-- | ext/tk/ChangeLog.tkextlib | 4 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tile/style.rb | 2 |
4 files changed, 22 insertions, 0 deletions
@@ -1,3 +1,10 @@ +Wed Nov 10 03:33:36 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> + + * ext/tcltklib/tcltklib.c: fix SEGV when compiled with Tcl/Tk8.3.x + or older + + * ext/tk/lib/tkextlib/tile/style.rb: bug fix + Tue Nov 9 22:24:07 2004 NARUSE, Yui <naruse@ruby-lang.org> * ext/nkf: original nkf.c rev:1.38 diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c index 765417d92..67958d7be 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); diff --git a/ext/tk/ChangeLog.tkextlib b/ext/tk/ChangeLog.tkextlib index 25f446910..deda55052 100644 --- a/ext/tk/ChangeLog.tkextlib +++ b/ext/tk/ChangeLog.tkextlib @@ -1,3 +1,7 @@ +2004-11-10 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> + + * lib/tile/style.rb: bug fix + 2004-11-07 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> * ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb: diff --git a/ext/tk/lib/tkextlib/tile/style.rb b/ext/tk/lib/tkextlib/tile/style.rb index 1e399182d..3be8c1d58 100644 --- a/ext/tk/lib/tkextlib/tile/style.rb +++ b/ext/tk/lib/tkextlib/tile/style.rb @@ -58,6 +58,8 @@ class << Tk::Tile::Style end def theme_settings(name, cmd=nil, &b) + cmd = Proc.new(&b) if !cmd && b + tk_call('style', 'theme', 'settings', name, cmd) end def theme_names() |