1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nagai 2004-11-09 18:35:52 +00:00
parent 3df602c018
commit cd84994255
4 changed files with 22 additions and 0 deletions

View file

@ -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> Tue Nov 9 22:24:07 2004 NARUSE, Yui <naruse@ruby-lang.org>
* ext/nkf: original nkf.c rev:1.38 * ext/nkf: original nkf.c rev:1.38

View file

@ -3306,9 +3306,12 @@ delete_slaves(ip)
Tcl_Preserve(slave); Tcl_Preserve(slave);
#if TCL_MAJOR_VERSION < 8 || ( TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 4)
#else
if (!Tcl_InterpDeleted(slave)) { if (!Tcl_InterpDeleted(slave)) {
Tcl_Eval(slave, "foreach i [after info] { after cancel $i }"); Tcl_Eval(slave, "foreach i [after info] { after cancel $i }");
} }
#endif
/* delete slaves of slave */ /* delete slaves of slave */
delete_slaves(slave); delete_slaves(slave);
@ -3356,9 +3359,12 @@ ip_free(ptr)
Tcl_Eval(ptr->ip, finalize_hook_name); 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)) { if (!Tcl_InterpDeleted(ptr->ip)) {
Tcl_Eval(ptr->ip, "foreach i [after info] {after cancel $i}"); Tcl_Eval(ptr->ip, "foreach i [after info] {after cancel $i}");
} }
#endif
del_root(ptr->ip); del_root(ptr->ip);
@ -3820,9 +3826,12 @@ ip_delete(self)
/* Tcl_Preserve(ptr->ip); */ /* Tcl_Preserve(ptr->ip); */
rbtk_preserve_ip(ptr); rbtk_preserve_ip(ptr);
#if TCL_MAJOR_VERSION < 8 || ( TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 4)
#else
if (!Tcl_InterpDeleted(ptr->ip)) { if (!Tcl_InterpDeleted(ptr->ip)) {
Tcl_Eval(ptr->ip, "foreach i [after info] { after cancel $i }"); Tcl_Eval(ptr->ip, "foreach i [after info] { after cancel $i }");
} }
#endif
del_root(ptr->ip); del_root(ptr->ip);

View file

@ -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> 2004-11-07 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb: * ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb:

View file

@ -58,6 +58,8 @@ class << Tk::Tile::Style
end end
def theme_settings(name, cmd=nil, &b) def theme_settings(name, cmd=nil, &b)
cmd = Proc.new(&b) if !cmd && b
tk_call('style', 'theme', 'settings', name, cmd)
end end
def theme_names() def theme_names()