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

ruby-changes:27934

From: nobu <ko1@a...>
Date: Thu, 28 Mar 2013 22:13:18 +0900 (JST)
Subject: [ruby-changes:27934] nobu:r39986 (trunk): tcltklib.c: rb_thread_alive_p macro

nobu	2013-03-28 22:11:00 +0900 (Thu, 28 Mar 2013)

  New Revision: 39986

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

  Log:
    tcltklib.c: rb_thread_alive_p macro
    
    * ext/tk/tcltklib.c (rb_thread_alive_p): turn into a macro, so that
      same code is generated.

  Modified files:
    trunk/ext/tk/tcltklib.c

Index: ext/tk/tcltklib.c
===================================================================
--- ext/tk/tcltklib.c	(revision 39985)
+++ ext/tk/tcltklib.c	(revision 39986)
@@ -270,11 +270,7 @@ static CONST86 Tcl_ObjType *Tcl_ObjType_ https://github.com/ruby/ruby/blob/trunk/ext/tk/tcltklib.c#L270
 #endif
 
 #ifndef HAVE_RB_THREAD_ALIVE_P
-static VALUE
-rb_thread_alive_p(VALUE thread)
-{
-    return rb_funcall(thread, ID_alive_p, 0, 0);
-}
+#define rb_thread_alive_p(thread) rb_funcall2((thread), ID_alive_p, 0, NULL)
 #endif
 
 /* safe Tcl_Eval and Tcl_GlobalEval */

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

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