* ext/tk/lib/tk.rb: Tk.after makes TkCore::INTERP.tk_cmd_tbl grow [ruby-dev:24207]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagai 2004-09-03 02:33:08 +00:00
Родитель 0a054a5fd8
Коммит 7cf8256075
2 изменённых файлов: 19 добавлений и 2 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Fri Sep 3 11:31:44 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk.rb: Tk.after makes TkCore::INTERP.tk_cmd_tbl grow
[ruby-dev:24207]
Fri Sep 3 02:12:48 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tcltklib/tcltklib.c: fix typo [ruby-talk:111266]

Просмотреть файл

@ -1191,8 +1191,14 @@ module TkCore
end
def after(ms, cmd=Proc.new)
crit_bup = Thread.critical
Thread.critical = true
myid = _curr_cmd_id
cmdid = install_cmd(cmd)
cmdid = install_cmd(proc{ret = cmd.call;uninstall_cmd(myid); ret})
Thread.critical = crit_bup
tk_call_without_enc("after",ms,cmdid) # return id
# return
# if false #defined? Thread
@ -1209,8 +1215,14 @@ module TkCore
end
def after_idle(cmd=Proc.new)
crit_bup = Thread.critical
Thread.critical = true
myid = _curr_cmd_id
cmdid = install_cmd(cmd)
cmdid = install_cmd(proc{ret = cmd.call;uninstall_cmd(myid); ret})
Thread.critical = crit_bup
tk_call_without_enc('after','idle',cmdid)
end