mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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`.
This commit is contained in:
@@ -892,7 +892,7 @@ break_new(mrb_state *mrb, uint32_t tag, const struct RProc *p, mrb_value val)
|
||||
{
|
||||
struct RBreak *brk;
|
||||
|
||||
brk = (struct RBreak*)mrb_obj_alloc(mrb, MRB_TT_BREAK, NULL);
|
||||
brk = MRB_OBJ_ALLOC(mrb, MRB_TT_BREAK, NULL);
|
||||
mrb_break_proc_set(brk, p);
|
||||
mrb_break_value_set(brk, val);
|
||||
mrb_break_tag_set(brk, tag);
|
||||
|
||||
Reference in New Issue
Block a user