Skip to content

Commit

Permalink
rb_vm_add_root_module(): Remove unused parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
XrXr committed Nov 9, 2020
1 parent cbe869b commit 6817f4c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions class.c
Expand Up @@ -626,7 +626,7 @@ boot_defclass(const char *name, VALUE super)
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;
}

Expand Down Expand Up @@ -748,14 +748,14 @@ rb_define_class(const char *name, VALUE 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;
}
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);

Expand Down Expand Up @@ -821,7 +821,7 @@ rb_define_class_id_under(VALUE outer, ID id, VALUE super)
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;
}
Expand All @@ -833,7 +833,7 @@ rb_define_class_id_under(VALUE outer, ID id, VALUE super)
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;
Expand Down Expand Up @@ -867,11 +867,11 @@ rb_define_module(const char *name)
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);

Expand Down
2 changes: 1 addition & 1 deletion internal/vm.h
Expand Up @@ -54,7 +54,7 @@ const void **rb_vm_get_insns_address_table(void);
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);
Expand Down
2 changes: 1 addition & 1 deletion vm.c
Expand Up @@ -2597,7 +2597,7 @@ rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE cls,
}

int
rb_vm_add_root_module(ID id, VALUE module)
rb_vm_add_root_module(VALUE module)
{
rb_vm_t *vm = GET_VM();

Expand Down

0 comments on commit 6817f4c

Please sign in to comment.