From db678329c00bd6cf08402c07e1f85f0752e9722e Mon Sep 17 00:00:00 2001 From: Jun Hiroe Date: Wed, 3 Jul 2013 20:52:48 +0900 Subject: Add comments in mrb_get_args() func. --- src/class.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/class.c b/src/class.c index 237109936..0d71886d3 100644 --- a/src/class.c +++ b/src/class.c @@ -375,20 +375,22 @@ to_hash(mrb_state *mrb, mrb_value val) format specifiers: - o: Object [mrb_value] - S: String [mrb_value] - A: Array [mrb_value] - H: Hash [mrb_value] - s: String [char*,int] - z: String [char*] - a: Array [mrb_value*,mrb_int] - f: Float [mrb_float] - i: Integer [mrb_int] - b: Boolean [mrb_bool] - n: Symbol [mrb_sym] - &: Block [mrb_value] - *: rest argument [mrb_value*,int] - |: optional + string mruby type C type note + ---------------------------------------------------------------------------------------------- + o: Object [mrb_value] + S: String [mrb_value] + A: Array [mrb_value] + H: Hash [mrb_value] + s: String [char*,int] Receive two arguments. + z: String [char*] NUL terminated string. + a: Array [mrb_value*,mrb_int] Receive two arguments. + f: Float [mrb_float] + i: Integer [mrb_int] + b: Boolean [mrb_bool] + n: Symbol [mrb_sym] + &: Block [mrb_value] + *: rest argument [mrb_value*,int] Receive the rest of the arguments as an array. + |: optional Next argument of '|' and later are optional. */ int mrb_get_args(mrb_state *mrb, const char *format, ...) -- cgit v1.2.3