mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/tk/tkutil/tkutil.c: fix SEGV on TkUtil::CallbackSubst._setup_subst_table.
* ext/tk/lib/tk.rb: [ruby1.9] fix freeze at exit. * ext/tk/lib/tk.rb: [POTENTIAL INCOMPATIBLE] return NoMethodError for TkWindow#to_ary and to_str. * ext/tk/lib/tkextlib/tcllib/plotchart.rb: wrong arguments. * ext/tk/sampel/tkballoonhelp.rb: fail to support TkEntry widgets. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8d33d0a560
commit
023a34526b
5 changed files with 51 additions and 16 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
||||||
|
Mon Feb 1 07:36:33 2010 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
|
* ext/tk/tkutil/tkutil.c: fix SEGV on TkUtil::CallbackSubst._setup_subst_table.
|
||||||
|
|
||||||
|
* ext/tk/lib/tk.rb: [ruby1.9] fix freeze at exit.
|
||||||
|
|
||||||
|
* ext/tk/lib/tk.rb: [POTENTIAL INCOMPATIBLE] return NoMethodError
|
||||||
|
for TkWindow#to_ary and to_str.
|
||||||
|
|
||||||
|
* ext/tk/lib/tkextlib/tcllib/plotchart.rb: wrong arguments.
|
||||||
|
|
||||||
|
* ext/tk/sampel/tkballoonhelp.rb: fail to support TkEntry widgets.
|
||||||
|
|
||||||
Sun Jan 31 23:20:43 2010 wanabe <s.wanabe@gmail.com>
|
Sun Jan 31 23:20:43 2010 wanabe <s.wanabe@gmail.com>
|
||||||
|
|
||||||
* io.c (rb_io_each_codepoint): use cbuf when needs readconv.
|
* io.c (rb_io_each_codepoint): use cbuf when needs readconv.
|
||||||
|
|
|
@ -1174,6 +1174,8 @@ module TkCore
|
||||||
opts = ''
|
opts = ''
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# RUN_EVENTLOOP_ON_MAIN_THREAD = true
|
||||||
|
|
||||||
unless self.const_defined? :RUN_EVENTLOOP_ON_MAIN_THREAD
|
unless self.const_defined? :RUN_EVENTLOOP_ON_MAIN_THREAD
|
||||||
if WITH_RUBY_VM ### check Ruby 1.9 !!!!!!!
|
if WITH_RUBY_VM ### check Ruby 1.9 !!!!!!!
|
||||||
# *** NEED TO FIX ***
|
# *** NEED TO FIX ***
|
||||||
|
@ -1275,6 +1277,14 @@ module TkCore
|
||||||
|
|
||||||
INTERP = INTERP_THREAD[:interp]
|
INTERP = INTERP_THREAD[:interp]
|
||||||
INTERP_THREAD_STATUS = INTERP_THREAD[:status]
|
INTERP_THREAD_STATUS = INTERP_THREAD[:status]
|
||||||
|
|
||||||
|
# delete the interpreter and kill the eventloop thread at exit
|
||||||
|
END{
|
||||||
|
if INTERP_THREAD.alive?
|
||||||
|
INTERP.delete
|
||||||
|
INTERP_THREAD.kill
|
||||||
|
end
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def INTERP.__getip
|
def INTERP.__getip
|
||||||
|
@ -4890,7 +4900,7 @@ class TkObject<TkKernel
|
||||||
begin
|
begin
|
||||||
cget(name)
|
cget(name)
|
||||||
rescue
|
rescue
|
||||||
if self.kind_of?(TkWindow)
|
if self.kind_of?(TkWindow) && name != "to_ary" && name != "to_str"
|
||||||
fail NameError,
|
fail NameError,
|
||||||
"unknown option '#{id}' for #{self.inspect} (deleted widget?)"
|
"unknown option '#{id}' for #{self.inspect} (deleted widget?)"
|
||||||
else
|
else
|
||||||
|
|
|
@ -145,8 +145,8 @@ module Tk::Tcllib::Plotchart
|
||||||
list(tk_call_without_enc('::Plotchart::coordsToPixel', w.path, x, y))
|
list(tk_call_without_enc('::Plotchart::coordsToPixel', w.path, x, y))
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.determine_scale(w, xmax, ymax)
|
def self.determine_scale(*args) # (xmin, xmax, inverted=false)
|
||||||
tk_call_without_enc('::Plotchart::determineScale', w.path, xmax, ymax)
|
tk_call_without_enc('::Plotchart::determineScale', *args)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.set_zoom_pan(w)
|
def self.set_zoom_pan(w)
|
||||||
|
|
|
@ -111,12 +111,24 @@ class Tk::RbWidget::BalloonHelp<TkLabel
|
||||||
@frame.deiconify
|
@frame.deiconify
|
||||||
@frame.raise
|
@frame.raise
|
||||||
|
|
||||||
@org_cursor = @parent['cursor']
|
begin
|
||||||
@parent.cursor('crosshair')
|
@org_cursor = @parent.cget('cursor')
|
||||||
|
rescue
|
||||||
|
@org_cursor = @parent['cursor']
|
||||||
|
end
|
||||||
|
begin
|
||||||
|
@parent.configure('cursor', 'crosshair')
|
||||||
|
rescue
|
||||||
|
@parent.cursor('crosshair')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def erase
|
def erase
|
||||||
@parent.cursor(@org_cursor)
|
begin
|
||||||
|
@parent.configure('cursor', @org_cursor)
|
||||||
|
rescue
|
||||||
|
@parent.cursor(@org_cursor)
|
||||||
|
end
|
||||||
@frame.withdraw
|
@frame.withdraw
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1167,8 +1167,8 @@ subst_free(ptr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct cbsubst_info *
|
static VALUE
|
||||||
allocate_cbsubst_info()
|
allocate_cbsubst_info(struct cbsubst_info **inf_ptr)
|
||||||
{
|
{
|
||||||
struct cbsubst_info *inf;
|
struct cbsubst_info *inf;
|
||||||
volatile VALUE proc, aliases;
|
volatile VALUE proc, aliases;
|
||||||
|
@ -1191,15 +1191,16 @@ allocate_cbsubst_info()
|
||||||
aliases = rb_hash_new();
|
aliases = rb_hash_new();
|
||||||
inf->aliases = aliases;
|
inf->aliases = aliases;
|
||||||
|
|
||||||
return inf;
|
if (inf_ptr != (struct cbsubst_info **)NULL) *inf_ptr = inf;
|
||||||
|
|
||||||
|
return Data_Wrap_Struct(cSUBST_INFO, subst_mark, subst_free, inf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cbsubst_init()
|
cbsubst_init()
|
||||||
{
|
{
|
||||||
rb_const_set(cCB_SUBST, ID_SUBST_INFO,
|
rb_const_set(cCB_SUBST, ID_SUBST_INFO,
|
||||||
Data_Wrap_Struct(cSUBST_INFO, subst_mark, subst_free,
|
allocate_cbsubst_info((struct cbsubst_info **)NULL));
|
||||||
allocate_cbsubst_info()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
@ -1517,6 +1518,7 @@ cbsubst_table_setup(argc, argv, self)
|
||||||
VALUE *argv;
|
VALUE *argv;
|
||||||
VALUE self;
|
VALUE self;
|
||||||
{
|
{
|
||||||
|
volatile VALUE cbsubst_obj;
|
||||||
volatile VALUE key_inf;
|
volatile VALUE key_inf;
|
||||||
volatile VALUE longkey_inf;
|
volatile VALUE longkey_inf;
|
||||||
volatile VALUE proc_inf;
|
volatile VALUE proc_inf;
|
||||||
|
@ -1538,7 +1540,7 @@ cbsubst_table_setup(argc, argv, self)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* init */
|
/* init */
|
||||||
subst_inf = allocate_cbsubst_info();
|
cbsubst_obj = allocate_cbsubst_info(&subst_inf);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* keys : array of [subst, type, ivar]
|
* keys : array of [subst, type, ivar]
|
||||||
|
@ -1625,9 +1627,7 @@ cbsubst_table_setup(argc, argv, self)
|
||||||
RARRAY_PTR(inf)[1]);
|
RARRAY_PTR(inf)[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
rb_const_set(self, ID_SUBST_INFO,
|
rb_const_set(self, ID_SUBST_INFO, cbsubst_obj);
|
||||||
Data_Wrap_Struct(cSUBST_INFO, subst_mark,
|
|
||||||
subst_free, subst_inf));
|
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue