summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-10-17 15:24:00 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-10-17 15:24:00 +0900
commit913b83d579487058a2d865b3e430d7e887efea93 (patch)
treeb74114ea4a9458cff1b3603eedfe0c20f5742197 /include
parent4122c320bb8a81ff66eae72e25eda8af6c768683 (diff)
parent3c20c96f840d40950f4da61bd93f773a83767aef (diff)
downloadmruby-913b83d579487058a2d865b3e430d7e887efea93.tar.gz
mruby-913b83d579487058a2d865b3e430d7e887efea93.zip
Merge branch 'dabroz-fix-get-argc'
Diffstat (limited to 'include')
-rw-r--r--include/mruby.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/mruby.h b/include/mruby.h
index 316707909..5c5a631e2 100644
--- a/include/mruby.h
+++ b/include/mruby.h
@@ -858,11 +858,14 @@ mrb_get_mid(mrb_state *mrb) /* get method symbol */
return mrb->c->ci->mid;
}
-static inline mrb_int
-mrb_get_argc(mrb_state *mrb) /* get argc */
-{
- return mrb->c->ci->argc;
-}
+/**
+ * Retrieve number of arguments from mrb_state.
+ *
+ * Correctly handles *splat arguments.
+ */
+MRB_API mrb_int mrb_get_argc(mrb_state *mrb);
+
+MRB_API mrb_value* mrb_get_argv(mrb_state *mrb);
/* `strlen` for character string literals (use with caution or `strlen` instead)
Adjacent string literals are concatenated in C/C++ in translation phase 6.