diff options
| author | dearblue <[email protected]> | 2021-06-20 11:08:28 +0900 |
|---|---|---|
| committer | dearblue <[email protected]> | 2021-06-20 11:08:28 +0900 |
| commit | cc95e346fd9cc26bb6fc3fb7b1082d7d011ef664 (patch) | |
| tree | 63d154c95d0936ed7d22dd5294a6777a74b35d64 /mrbgems/mruby-method | |
| parent | f678620a436aa015f9252858aa00112256ab0668 (diff) | |
| download | mruby-cc95e346fd9cc26bb6fc3fb7b1082d7d011ef664.tar.gz mruby-cc95e346fd9cc26bb6fc3fb7b1082d7d011ef664.zip | |
Added `MRB_OBJ_ALLOC()` macro that does not require a cast
The `MRB_OBJ_ALLOC()` macro function returns a pointer of the type corresponding to the constant literal defined in `enum mrb_vtype`.
Diffstat (limited to 'mrbgems/mruby-method')
| -rw-r--r-- | mrbgems/mruby-method/src/method.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-method/src/method.c b/mrbgems/mruby-method/src/method.c index 02eddda9c..7410f007e 100644 --- a/mrbgems/mruby-method/src/method.c +++ b/mrbgems/mruby-method/src/method.c @@ -81,7 +81,7 @@ method_missing_prepare(mrb_state *mrb, mrb_sym *mid, mrb_value recv, struct RCla static struct RObject * method_object_alloc(mrb_state *mrb, struct RClass *mclass) { - return (struct RObject*)mrb_obj_alloc(mrb, MRB_TT_OBJECT, mclass); + return MRB_OBJ_ALLOC(mrb, MRB_TT_OBJECT, mclass); } static struct RProc* |
