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

ruby-changes:26515

From: nobu <ko1@a...>
Date: Sun, 23 Dec 2012 14:43:14 +0900 (JST)
Subject: [ruby-changes:26515] nobu:r38566 (trunk): marshal.c: use RB_TYPE_P

nobu	2012-12-23 14:43:04 +0900 (Sun, 23 Dec 2012)

  New Revision: 38566

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

  Log:
    marshal.c: use RB_TYPE_P
    
    * marshal.c (r_entry0): use RB_TYPE_P.

  Modified files:
    trunk/marshal.c

Index: marshal.c
===================================================================
--- marshal.c	(revision 38565)
+++ marshal.c	(revision 38566)
@@ -1324,7 +1324,7 @@ r_entry0(VALUE v, st_index_t num, struct https://github.com/ruby/ruby/blob/trunk/marshal.c#L1324
         st_insert(arg->data, num, (st_data_t)v);
     }
     if (arg->infection &&
-	TYPE(v) != T_CLASS && TYPE(v) != T_MODULE) {
+	!RB_TYPE_P(v, T_CLASS) && !RB_TYPE_P(v, T_MODULE)) {
 	FL_SET(v, arg->infection);
 	if ((VALUE)real_obj != Qundef)
 	    FL_SET((VALUE)real_obj, arg->infection);

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

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