Commit cc5f40b2 authored by Felix Jones's avatar Felix Jones

mrb_class_under_defined docs renamed parent and child to outer and inner

parent 8d6aa065
...@@ -567,18 +567,18 @@ MRB_API mrb_bool mrb_class_defined(mrb_state *mrb, const char *name); ...@@ -567,18 +567,18 @@ MRB_API mrb_bool mrb_class_defined(mrb_state *mrb, const char *name);
MRB_API struct RClass * mrb_class_get(mrb_state *mrb, const char *name); MRB_API struct RClass * mrb_class_get(mrb_state *mrb, const char *name);
/** /**
* Returns an mrb_bool. True if child class was defined, and false if the child class was not defined. * Returns an mrb_bool. True if inner class was defined, and false if the inner class was not defined.
* *
* Example: * Example:
* void * void
* mrb_example_gem_init(mrb_state* mrb) { * mrb_example_gem_init(mrb_state* mrb) {
* struct RClass *example_parent, *example_child; * struct RClass *example_outer, *example_inner;
* mrb_bool cd; * mrb_bool cd;
* *
* example_parent = mrb_define_module(mrb, "ExampleParent"); * example_outer = mrb_define_module(mrb, "ExampleOuter");
* *
* example_child = mrb_define_class(mrb, "ExampleChild", mrb->object_class); * example_inner = mrb_define_class_under(mrb, example_outer, "ExampleInner", mrb->object_class);
* cd = mrb_class_under_defined(mrb, example_parent, "ExampleChild"); * cd = mrb_class_under_defined(mrb, example_outer, "ExampleInner");
* *
* // If mrb_class_under_defined returns 1 then puts "True" * // If mrb_class_under_defined returns 1 then puts "True"
* // If mrb_class_under_defined returns 0 then puts "False" * // If mrb_class_under_defined returns 0 then puts "False"
...@@ -591,8 +591,8 @@ MRB_API struct RClass * mrb_class_get(mrb_state *mrb, const char *name); ...@@ -591,8 +591,8 @@ MRB_API struct RClass * mrb_class_get(mrb_state *mrb, const char *name);
* } * }
* *
* @param [mrb_state*] mrb The current mruby state. * @param [mrb_state*] mrb The current mruby state.
* @param [struct RClass *] outer The name of the parent class. * @param [struct RClass *] outer The name of the outer class.
* @param [const char *] name A string representing the name of the child class. * @param [const char *] name A string representing the name of the inner class.
* @return [mrb_bool] A boolean value. * @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_under_defined(mrb_state *mrb, struct RClass *outer, const char *name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment