@@ -574,42 +574,45 @@ MRB_API struct RClass * mrb_define_module_under(mrb_state *mrb, struct RClass *o
574574#define MRB_ARGS_NONE () ((mrb_aspec)0)
575575
576576/**
577- * Format specifiers for \ref mrb_get_args function
578- *
579- * Must be a list of following format specifiers:
580- *
581- * | char | mruby type | retrieve types |note |
582- * |:----:|----------------|---------------------|----------------------------------------------------|
583- * | o | Object | mrb_value | Could be used to retrieve any type of argument |
584- * | C | Class/Module | mrb_value | |
585- * | S | String | mrb_value | when ! follows, the value may be nil |
586- * | A | Array | mrb_value | when ! follows, the value may be nil |
587- * | H | Hash | mrb_value | when ! follows, the value may be nil |
588- * | s | String | char *, mrb_int | Receive two arguments; s! gives (NULL,0) for nil |
589- * | z | String | char * | NUL terminated string; z! gives NULL for nil |
590- * | a | Array | mrb_value *, mrb_int | Receive two arguments; a! gives (NULL,0) for nil |
591- * | f | Float | mrb_float | |
592- * | i | Integer | mrb_int | |
593- * | b | boolean | mrb_bool | |
594- * | n | Symbol | mrb_sym | |
595- * | & | block | mrb_value | |
596- * | * | rest arguments | mrb_value *, mrb_int | Receive the rest of arguments as an array. |
597- * | \| | optional | | After this spec following specs would be optional. |
598- * | ? | optional given | mrb_bool | True if preceding argument is given. Used to check optional argument is given. |
577+ * Format specifiers for {mrb_get_args} function
578+ *
579+ * Must be a C string composed of the following format specifiers:
580+ *
581+ * | char | Ruby type | C types | Notes |
582+ * |:----:|----------------|-------------------|----------------------------------------------------|
583+ * | `o` | {Object} | {mrb_value} | Could be used to retrieve any type of argument |
584+ * | `C` | {Class}/{Module} | {mrb_value} | |
585+ * | `S` | {String} | {mrb_value} | when `!` follows, the value may be `nil` |
586+ * | `A` | {Array} | {mrb_value} | when `!` follows, the value may be `nil` |
587+ * | `H` | {Hash} | {mrb_value} | when `!` follows, the value may be `nil` |
588+ * | `s` | {String} | char *, {mrb_int} | Receive two arguments; `s!` gives (`NULL`,`0`) for `nil` |
589+ * | `z` | {String} | char * | `NULL` terminated string; `z!` gives `NULL` for `nil` |
590+ * | `a` | {Array} | {mrb_value} *, {mrb_int} | Receive two arguments; `a!` gives (`NULL`,`0`) for `nil` |
591+ * | `f` | {Float} | {mrb_float} | |
592+ * | `i` | {Integer} | {mrb_int} | |
593+ * | `b` | boolean | {mrb_bool} | |
594+ * | `n` | {Symbol} | {mrb_sym} | |
595+ * | `&` | block | {mrb_value} | |
596+ * | `*` | rest arguments | {mrb_value} *, {mrb_int} | Receive the rest of arguments as an array. |
597+ * | | | optional | | After this spec following specs would be optional. |
598+ * | `?` | optional given | {mrb_bool} | `TRUE` if preceding argument is given. Used to check optional argument is given. |
599+ *
600+ * @see mrb_get_args
599601 */
600602typedef const char * mrb_args_format ;
601603
602604/**
603605 * Retrieve arguments from mrb_state.
604606 *
605- * When applicable, implicit conversions (such as to_str, to_ary, to_hash) are
607+ * When applicable, implicit conversions (such as ` to_str`, ` to_ary`, ` to_hash` ) are
606608 * applied to received arguments.
607- * Use it inside a function pointed by mrb_func_t.
609+ * Used inside a function of mrb_func_t type .
608610 *
609611 * @param mrb The current MRuby state.
610- * @param format is a list of format specifiers see @ref mrb_args_format
612+ * @param format [mrb_args_format] is a list of format specifiers
611613 * @param ... The passing variadic arguments must be a pointer of retrieving type.
612614 * @return the number of arguments retrieved.
615+ * @see mrb_args_format
613616 */
614617MRB_API mrb_int mrb_get_args (mrb_state * mrb , mrb_args_format format , ...);
615618
@@ -726,7 +729,7 @@ MRB_API void mrb_close(mrb_state *mrb);
726729/**
727730 * The default allocation function.
728731 *
729- * @ref mrb_allocf
732+ * @see mrb_allocf
730733 */
731734MRB_API void * mrb_default_allocf (mrb_state * , void * , size_t , void * );
732735
@@ -854,9 +857,26 @@ MRB_API mrb_value mrb_attr_get(mrb_state *mrb, mrb_value obj, mrb_sym id);
854857MRB_API mrb_bool mrb_respond_to (mrb_state * mrb , mrb_value obj , mrb_sym mid );
855858MRB_API mrb_bool mrb_obj_is_instance_of (mrb_state * mrb , mrb_value obj , struct RClass * c );
856859
857- /* fiber functions (you need to link mruby-fiber mrbgem to use) */
860+
861+ /*
862+ * Resume a Fiber
863+ *
864+ * @mrbgem mruby-fiber
865+ */
858866MRB_API mrb_value mrb_fiber_resume (mrb_state * mrb , mrb_value fib , mrb_int argc , const mrb_value * argv );
867+
868+ /*
869+ * Yield a Fiber
870+ *
871+ * @mrbgem mruby-fiber
872+ */
859873MRB_API mrb_value mrb_fiber_yield (mrb_state * mrb , mrb_int argc , const mrb_value * argv );
874+
875+ /*
876+ * FiberError reference
877+ *
878+ * @mrbgem mruby-fiber
879+ */
860880#define E_FIBER_ERROR (mrb_class_get(mrb, "FiberError"))
861881
862882/* memory pool implementation */
0 commit comments