[前][次][番号順一覧][スレッド一覧]

ruby-changes:9387

From: yugui <ko1@a...>
Date: Tue, 23 Dec 2008 11:17:25 +0900 (JST)
Subject: [ruby-changes:9387] Ruby:r20925 (ruby_1_9_1): * thread.c (Thread#set_trace_func, #add_trace_func): removed.

yugui	2008-12-23 11:17:00 +0900 (Tue, 23 Dec 2008)

  New Revision: 20925

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20925

  Log:
    * thread.c (Thread#set_trace_func, #add_trace_func): removed.
      This is an unsupported feature in 1.9.1 and will be supported 
      in 1.9.2. [ruby-core:19581]
      (thread_add_trace_func): removes unnecessary function.
      (thread_add_trace_func_m): ditto.
      (thread_set_trace_func_m): ditto.

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/thread.c

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 20924)
+++ ruby_1_9_1/ChangeLog	(revision 20925)
@@ -1,3 +1,12 @@
+Mon Dec 22 15:25:03 2008  Yuki Sonoda (Yugui)  <yugui@y...>
+
+	* thread.c (Thread#set_trace_func, #add_trace_func): removed.
+	  This is an unsupported feature in 1.9.1 and will be supported 
+	  in 1.9.2. [ruby-core:19581]
+	  (thread_add_trace_func): removes unnecessary function.
+	  (thread_add_trace_func_m): ditto.
+	  (thread_set_trace_func_m): ditto.
+
 Sat Dec 20 18:28:26 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* dln.c (dln_find_1): supplements an extension for executable
Index: ruby_1_9_1/thread.c
===================================================================
--- ruby_1_9_1/thread.c	(revision 20924)
+++ ruby_1_9_1/thread.c	(revision 20925)
@@ -3398,39 +3398,6 @@
     return trace;
 }
 
-static void
-thread_add_trace_func(rb_thread_t *th, VALUE trace)
-{
-    if (!rb_obj_is_proc(trace)) {
-	rb_raise(rb_eTypeError, "trace_func needs to be Proc");
-    }
-
-    rb_thread_add_event_hook(th, call_trace_func, RUBY_EVENT_ALL, trace);
-}
-
-static VALUE
-thread_add_trace_func_m(VALUE obj, VALUE trace)
-{
-    rb_thread_t *th;
-    GetThreadPtr(obj, th);
-    thread_add_trace_func(th, trace);
-    return trace;
-}
-
-static VALUE
-thread_set_trace_func_m(VALUE obj, VALUE trace)
-{
-    rb_thread_t *th;
-    GetThreadPtr(obj, th);
-    rb_thread_remove_event_hook(th, call_trace_func);
-
-    if (NIL_P(trace)) {
-	return Qnil;
-    }
-    thread_add_trace_func(th, trace);
-    return trace;
-}
-
 static const char *
 get_event_name(rb_event_flag_t event)
 {
@@ -3639,8 +3606,6 @@
 
     /* trace */
     rb_define_global_function("set_trace_func", set_trace_func, 1);
-    rb_define_method(rb_cThread, "set_trace_func", thread_set_trace_func_m, 1);
-    rb_define_method(rb_cThread, "add_trace_func", thread_add_trace_func_m, 1);
 
     /* init thread core */
     Init_native_thread();

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]