gc.c: add mrbc stub for mrb_task_mark_all

added forward declaration in gc.c and stub implementation in mrbc stub.c
for mrb_task_mark_all to avoid link errors when mrbc is built without
mruby-task gem.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-10-11 12:41:39 +09:00
parent 7469b79aa8
commit d1a48c03e2
2 changed files with 10 additions and 2 deletions
+8
View File
@@ -94,3 +94,11 @@ void mrb_gc_free_set(mrb_state *mrb, struct RBasic *obj)
/* stub for mrbc */
}
#endif
#ifdef MRB_USE_TASK_SCHEDULER
void mrb_task_mark_all(mrb_state *mrb)
{
/* stub for mrbc */
(void)mrb;
}
#endif
+2 -2
View File
@@ -29,8 +29,8 @@
#endif
#ifdef MRB_USE_TASK_SCHEDULER
/* Weak stub for mrb_task_mark_all - actual implementation in task.c */
void __attribute__((weak)) mrb_task_mark_all(mrb_state *mrb) { (void)mrb; }
/* Forward declaration - actual implementation in task.c */
void mrb_task_mark_all(mrb_state *mrb);
#endif
/*