mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-task: simplify stack marking using mrb_gc_mark_value
Replace manual mrb_immediate_p check with mrb_gc_mark_value macro which already includes the immediate check internally. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -98,10 +98,7 @@ mrb_task_mark_all(mrb_state *mrb)
|
||||
}
|
||||
if (c->stbase + e > c->stend) e = c->stend - c->stbase;
|
||||
for (i = 0; i < e; i++) {
|
||||
mrb_value v = c->stbase[i];
|
||||
if (!mrb_immediate_p(v)) {
|
||||
mrb_gc_mark(mrb, mrb_basic_ptr(v));
|
||||
}
|
||||
mrb_gc_mark_value(mrb, c->stbase[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user