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

ruby-changes:63560

From: Alan <ko1@a...>
Date: Tue, 10 Nov 2020 06:09:01 +0900 (JST)
Subject: [ruby-changes:63560] 6817f4c6b1 (master): rb_vm_add_root_module(): Remove unused parameter

https://git.ruby-lang.org/ruby.git/commit/?id=6817f4c6b1

From 6817f4c6b1ab58d74bab989de984bd1d84be233c Mon Sep 17 00:00:00 2001
From: Alan Wu <XrXr@u...>
Date: Mon, 9 Nov 2020 10:27:31 -0500
Subject: rb_vm_add_root_module(): Remove unused parameter


diff --git a/class.c b/class.c
index 857d863..13885d9 100644
--- a/class.c
+++ b/class.c
@@ -626,7 +626,7 @@ boot_defclass(const char *name, VALUE super) https://github.com/ruby/ruby/blob/trunk/class.c#L626
     ID id = rb_intern(name);
 
     rb_const_set((rb_cObject ? rb_cObject : obj), id, obj);
-    rb_vm_add_root_module(id, obj);
+    rb_vm_add_root_module(obj);
     return obj;
 }
 
@@ -748,14 +748,14 @@ rb_define_class(const char *name, VALUE super) https://github.com/ruby/ruby/blob/trunk/class.c#L748
 	}
 
         /* Class may have been defined in Ruby and not pin-rooted */
-        rb_vm_add_root_module(id, klass);
+        rb_vm_add_root_module(klass);
 	return klass;
     }
     if (!super) {
 	rb_raise(rb_eArgError, "no super class for `%s'", name);
     }
     klass = rb_define_class_id(id, super);
-    rb_vm_add_root_module(id, klass);
+    rb_vm_add_root_module(klass);
     rb_const_set(rb_cObject, id, klass);
     rb_class_inherited(super, klass);
 
@@ -821,7 +821,7 @@ rb_define_class_id_under(VALUE outer, ID id, VALUE super) https://github.com/ruby/ruby/blob/trunk/class.c#L821
 		     outer, rb_id2str(id), RCLASS_SUPER(klass), super);
 	}
         /* Class may have been defined in Ruby and not pin-rooted */
-        rb_vm_add_root_module(id, klass);
+        rb_vm_add_root_module(klass);
 
 	return klass;
     }
@@ -833,7 +833,7 @@ rb_define_class_id_under(VALUE outer, ID id, VALUE super) https://github.com/ruby/ruby/blob/trunk/class.c#L833
     rb_set_class_path_string(klass, outer, rb_id2str(id));
     rb_const_set(outer, id, klass);
     rb_class_inherited(super, klass);
-    rb_vm_add_root_module(id, klass);
+    rb_vm_add_root_module(klass);
     rb_gc_register_mark_object(klass);
 
     return klass;
@@ -867,11 +867,11 @@ rb_define_module(const char *name) https://github.com/ruby/ruby/blob/trunk/class.c#L867
 		     name, rb_obj_class(module));
 	}
         /* Module may have been defined in Ruby and not pin-rooted */
-        rb_vm_add_root_module(id, module);
+        rb_vm_add_root_module(module);
 	return module;
     }
     module = rb_define_module_id(id);
-    rb_vm_add_root_module(id, module);
+    rb_vm_add_root_module(module);
     rb_gc_register_mark_object(module);
     rb_const_set(rb_cObject, id, module);
 
diff --git a/internal/vm.h b/internal/vm.h
index 246a42a..5af422e 100644
--- a/internal/vm.h
+++ b/internal/vm.h
@@ -54,7 +54,7 @@ const void **rb_vm_get_insns_address_table(void); https://github.com/ruby/ruby/blob/trunk/internal/vm.h#L54
 VALUE rb_source_location(int *pline);
 const char *rb_source_location_cstr(int *pline);
 MJIT_STATIC void rb_vm_pop_cfunc_frame(void);
-int rb_vm_add_root_module(ID id, VALUE module);
+int rb_vm_add_root_module(VALUE module);
 void rb_vm_check_redefinition_by_prepend(VALUE klass);
 int rb_vm_check_optimizable_mid(VALUE mid);
 VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
diff --git a/vm.c b/vm.c
index 83911f8..f3a6803 100644
--- a/vm.c
+++ b/vm.c
@@ -2597,7 +2597,7 @@ rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE cls, https://github.com/ruby/ruby/blob/trunk/vm.c#L2597
 }
 
 int
-rb_vm_add_root_module(ID id, VALUE module)
+rb_vm_add_root_module(VALUE module)
 {
     rb_vm_t *vm = GET_VM();
 
-- 
cgit v0.10.2


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

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