Commit 8e72558b authored by felixjones's avatar felixjones

Added mrb_get_argc and mrb_get_mid

parent a1731254
......@@ -255,6 +255,18 @@ MRB_API struct RClass * mrb_define_module_under(mrb_state *mrb, struct RClass *o
MRB_API mrb_int mrb_get_args(mrb_state *mrb, const char *format, ...);
static inline mrb_sym
mrb_get_mid(mrb_state *mrb) /* get method symbol */
{
return mrb->c->ci->mid;
}
static inline int
mrb_get_argc(mrb_state *mrb) /* get argc */
{
return mrb->c->ci->argc;
}
/* `strlen` for character string literals (use with caution or `strlen` instead)
Adjacent string literals are concatenated in C/C++ in translation phase 6.
If `lit` is not one, the compiler will report a syntax error:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment