summaryrefslogtreecommitdiffhomepage
path: root/include/mruby.h
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-05-03 23:45:40 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-05-03 23:45:40 +0900
commitf977772359a8a5582df618568a229a7f1112c6cd (patch)
tree2b3c9b171d3560be098cc1a4fd617502d9f4df58 /include/mruby.h
parent1519e441a0676b8aaea8dbc123ad09cd9e6e449e (diff)
downloadmruby-f977772359a8a5582df618568a229a7f1112c6cd.tar.gz
mruby-f977772359a8a5582df618568a229a7f1112c6cd.zip
new macro mrb_int(mrb,x) to retrieve mrb_int from mrb_value with conversion if needed
Diffstat (limited to 'include/mruby.h')
-rw-r--r--include/mruby.h1
1 files changed, 1 insertions, 0 deletions
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 {