Skip to content

Commit

Permalink
Renamed class_under_defined to class_defined_under
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Jones committed Nov 10, 2016
1 parent cc5f40b commit e3c8092
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions include/mruby.h
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,10 @@ MRB_API struct RClass * mrb_class_get(mrb_state *mrb, const char *name);
* example_outer = mrb_define_module(mrb, "ExampleOuter");
*
* example_inner = mrb_define_class_under(mrb, example_outer, "ExampleInner", mrb->object_class);
* cd = mrb_class_under_defined(mrb, example_outer, "ExampleInner");
* cd = mrb_class_defined_under(mrb, example_outer, "ExampleInner");
*
* // If mrb_class_under_defined returns 1 then puts "True"
* // If mrb_class_under_defined returns 0 then puts "False"
* // If mrb_class_defined_under returns 1 then puts "True"
* // If mrb_class_defined_under returns 0 then puts "False"
* if (cd == 1){
* puts("True");
* }
Expand All @@ -595,7 +595,7 @@ MRB_API struct RClass * mrb_class_get(mrb_state *mrb, const char *name);
* @param [const char *] name A string representing the name of the inner class.
* @return [mrb_bool] A boolean value.
*/
MRB_API mrb_bool mrb_class_under_defined(mrb_state *mrb, struct RClass *outer, const char *name);
MRB_API mrb_bool mrb_class_defined_under(mrb_state *mrb, struct RClass *outer, const char *name);

/**
* Gets a child class.
Expand Down
2 changes: 1 addition & 1 deletion src/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ mrb_class_defined(mrb_state *mrb, const char *name)
}

MRB_API mrb_bool
mrb_class_under_defined(mrb_state *mrb, struct RClass *outer, const char *name)
mrb_class_defined_under(mrb_state *mrb, struct RClass *outer, const char *name)
{
mrb_value sym = mrb_check_intern_cstr(mrb, name);
if (mrb_nil_p(sym)) {
Expand Down

0 comments on commit e3c8092

Please sign in to comment.