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

ruby-changes:39008

From: nobu <ko1@a...>
Date: Wed, 1 Jul 2015 17:18:23 +0900 (JST)
Subject: [ruby-changes:39008] nobu:r51089 (trunk): vm_method.c: no NOEX macros

nobu	2015-07-01 17:18:18 +0900 (Wed, 01 Jul 2015)

  New Revision: 51089

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

  Log:
    vm_method.c: no NOEX macros
    
    * vm_method.c (rb_method_entry_make): NOEX macros are no longer
      defined.

  Modified files:
    trunk/vm_method.c
Index: vm_method.c
===================================================================
--- vm_method.c	(revision 51088)
+++ vm_method.c	(revision 51089)
@@ -23,11 +23,6 @@ https://github.com/ruby/ruby/blob/trunk/vm_method.c#L23
 #define GLOBAL_METHOD_CACHE(c,m) (rb_bug("global method cache disabled improperly"), NULL)
 #endif
 
-#define NOEX_NOREDEF 0
-#ifndef NOEX_NOREDEF
-#define NOEX_NOREDEF NOEX_RESPONDS
-#endif
-
 static void rb_vm_check_redefinition_opt_method(const rb_method_entry_t *me, VALUE klass);
 
 #define object_id           idObject_id
@@ -403,7 +398,7 @@ rb_method_entry_make(VALUE klass, ID mid https://github.com/ruby/ruby/blob/trunk/vm_method.c#L398
 {
     rb_method_entry_t *me;
 
-#if NOEX_NOREDEF
+#ifdef METHOD_ENTRY_NOREDEF
     VALUE rklass;
 #endif
     st_table *mtbl;
@@ -427,7 +422,7 @@ rb_method_entry_make(VALUE klass, ID mid https://github.com/ruby/ruby/blob/trunk/vm_method.c#L422
     }
 
     rb_frozen_class_p(klass);
-#if NOEX_NOREDEF
+#ifdef METHOD_ENTRY_NOREDEF
     rklass = klass;
 #endif
 
@@ -450,8 +445,8 @@ rb_method_entry_make(VALUE klass, ID mid https://github.com/ruby/ruby/blob/trunk/vm_method.c#L445
 	rb_method_definition_t *old_def = old_me->def;
 
 	if (rb_method_definition_eq(old_def, def)) return old_me;
-#if NOEX_NOREDEF
-	if (old_me->flag & NOEX_NOREDEF) {
+#ifdef METHOD_ENTRY_NOREDEF
+	if (METHOD_ENTRY_NOREDEF(old_me)) {
 	    rb_raise(rb_eTypeError, "cannot redefine %"PRIsVALUE"#%"PRIsVALUE,
 		     rb_class_name(rklass), rb_id2str(mid));
 	}

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

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