From f977772359a8a5582df618568a229a7f1112c6cd Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 3 May 2014 23:45:40 +0900 Subject: new macro mrb_int(mrb,x) to retrieve mrb_int from mrb_value with conversion if needed --- include/mruby.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/mruby.h') diff --git a/include/mruby.h b/include/mruby.h index 9cf578836..db3b06aa8 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -381,6 +381,7 @@ mrb_value mrb_yield_with_class(mrb_state *mrb, mrb_value b, mrb_int argc, const void mrb_gc_protect(mrb_state *mrb, mrb_value obj); mrb_value mrb_to_int(mrb_state *mrb, mrb_value val); +#define mrb_int(mrb, val) mrb_fixnum(mrb_to_int(mrb, val)) void mrb_check_type(mrb_state *mrb, mrb_value x, enum mrb_vtype t); typedef enum call_type { -- cgit v1.2.3