Stop assuming alias proc in CI_PROC_SET()

Resolving alias proc should be done by the caller of `CI_PROC_SET()`.
The same applies to `mrb_vm_ci_proc_set()`.
This commit is contained in:
dearblue
2024-02-18 21:09:45 +09:00
parent 10de08fa4e
commit f5cce68ba6
+2 -1
View File
@@ -265,7 +265,8 @@ top_proc(mrb_state *mrb, const struct RProc *proc)
#define CI_PROC_SET(ci, p) do {\
ci->proc = p;\
ci->pc = (p && !MRB_PROC_CFUNC_P(p) && !MRB_PROC_ALIAS_P(p) && p->body.irep) ? p->body.irep->iseq : NULL; \
mrb_assert(!p || !MRB_PROC_ALIAS_P(p));\
ci->pc = (p && !MRB_PROC_CFUNC_P(p) && p->body.irep) ? p->body.irep->iseq : NULL;\
} while (0)
void