diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-25 12:04:29 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-25 12:04:29 +0900 |
| commit | 62ca4c17385e0018767b20badcb92a9002166ef0 (patch) | |
| tree | 3205d319c70a459c3b37fd3589634fef6b2495ab /include/mruby.h | |
| parent | ec8fad0fed5e29731a13762b3204e67891a86ca1 (diff) | |
| download | mruby-62ca4c17385e0018767b20badcb92a9002166ef0.tar.gz mruby-62ca4c17385e0018767b20badcb92a9002166ef0.zip | |
aspec bits should be packed in Ax; ref #1209
Diffstat (limited to 'include/mruby.h')
| -rw-r--r-- | include/mruby.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/mruby.h b/include/mruby.h index 88ab12b05..652fbe34c 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -170,20 +170,20 @@ struct RClass * mrb_define_class_under(mrb_state *mrb, struct RClass *outer, con struct RClass * mrb_define_module_under(mrb_state *mrb, struct RClass *outer, const char *name); /* required arguments */ -#define MRB_ARGS_REQ(n) ((mrb_aspec)((n)&0x1f) << 19) +#define MRB_ARGS_REQ(n) ((mrb_aspec)((n)&0x1f) << 18) /* optional arguments */ -#define MRB_ARGS_OPT(n) ((mrb_aspec)((n)&0x1f) << 14) +#define MRB_ARGS_OPT(n) ((mrb_aspec)((n)&0x1f) << 13) /* mandatory and optinal arguments */ #define MRB_ARGS_ARG(n1,n2) (MRB_ARGS_REQ(n1)|MRB_ARGS_OPT(n2)) /* rest argument */ -#define MRB_ARGS_REST() ((mrb_aspec)(1 << 13)) +#define MRB_ARGS_REST() ((mrb_aspec)(1 << 12)) /* required arguments after rest */ -#define MRB_ARGS_POST(n) ((mrb_aspec)((n)&0x1f) << 8) +#define MRB_ARGS_POST(n) ((mrb_aspec)((n)&0x1f) << 7) /* keyword arguments (n of keys, kdict) */ -#define MRB_ARGS_KEY(n1,n2) ((mrb_aspec)((((n1)&0x1f) << 3) | ((n2)?(1<<2):0))) +#define MRB_ARGS_KEY(n1,n2) ((mrb_aspec)((((n1)&0x1f) << 2) | ((n2)?(1<<1):0))) /* block argument */ -#define MRB_ARGS_BLOCK() ((mrb_aspec)(1 << 1)) +#define MRB_ARGS_BLOCK() ((mrb_aspec)1) /* accept any number of arguments */ #define MRB_ARGS_ANY() ARGS_REST() |
