From 5f10bd634fb6ae8f74a4ea730176233b0ca96954 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 23 Mar 2022 15:19:48 -0400 Subject: Add ISEQ_BODY macro Use ISEQ_BODY macro to get the rb_iseq_constant_body of the ISeq. Using this macro will make it easier for us to change the allocation strategy of rb_iseq_constant_body when using Variable Width Allocation. --- cont.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cont.c') diff --git a/cont.c b/cont.c index 667e6846b3..ee7b856bb1 100644 --- a/cont.c +++ b/cont.c @@ -1218,7 +1218,7 @@ show_vm_pcs(const rb_control_frame_t *cfp, while (cfp != end_of_cfp) { int pc = 0; if (cfp->iseq) { - pc = cfp->pc - cfp->iseq->body->iseq_encoded; + pc = cfp->pc - ISEQ_BODY(cfp->iseq)->iseq_encoded; } fprintf(stderr, "%2d pc: %d\n", i++, pc); cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp); -- cgit v1.2.1