From 83185f9ff097beb2946a5abf41c2b180db152f17 Mon Sep 17 00:00:00 2001 From: nagai Date: Wed, 29 Sep 2004 15:54:32 +0000 Subject: * ext/tcltklib/tcltklib.c (ip_init): bug fix * ext/tk/tkutil.c (get_eval_string_core): accept a Regexp object * ext/tk/lib/multi-tk.rb: fix bug on 'exit' operation * ext/tk/lib/tk/text.rb: 'tksearch' accepts a Regexp object as a matting pattern argument git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tcltklib/tcltklib.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ext/tcltklib/tcltklib.c') diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c index f1a81c9964..8b180bf493 100644 --- a/ext/tcltklib/tcltklib.c +++ b/ext/tcltklib/tcltklib.c @@ -3271,6 +3271,8 @@ delete_slaves(ip) char *slave_name; int i, len; + DUMP2("delete slaves of ip(%lx)", ip); + Tcl_Preserve(ip); if (Tcl_Eval(ip, "info slaves") == TCL_ERROR) { @@ -3339,7 +3341,10 @@ ip_free(ptr) thr_crit_bup = rb_thread_critical; rb_thread_critical = Qtrue; + DUMP2("IP ref_count = %d", ptr->ref_count); + if (!Tcl_InterpDeleted(ptr->ip)) { + DUMP2("IP(%lx) is not deleted", ptr->ip); /* Tcl_Preserve(ptr->ip); */ rbtk_preserve_ip(ptr); @@ -3369,6 +3374,7 @@ ip_free(ptr) } rbtk_release_ip(ptr); + DUMP2("IP ref_count = %d", ptr->ref_count); free(ptr); @@ -3418,7 +3424,8 @@ ip_init(argc, argv, self) rb_raise(rb_eRuntimeError, "fail to create a new Tk interpreter"); } - rbtk_preserve_ip((ClientData)ptr->ip); + rbtk_preserve_ip(ptr); + DUMP2("IP ref_count = %d", ptr->ref_count); current_interp = ptr->ip; ptr->has_orig_exit -- cgit v1.2.3