From b1aecef87364631b0001dd2aafc432931e19a98f Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 31 May 2019 15:58:50 +0900 Subject: Use UNALIGNED_MEMBER_PTR * internal.h (UNALIGNED_MEMBER_ACCESS, UNALIGNED_MEMBER_PTR): moved from eval_intern.h. * compile.c iseq.c, vm.c: use UNALIGNED_MEMBER_PTR for `entries` in `struct iseq_catch_table`. * vm_eval.c, vm_insnhelper.c: use UNALIGNED_MEMBER_PTR for `body` in `rb_method_definition_t`. --- vm_eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vm_eval.c') diff --git a/vm_eval.c b/vm_eval.c index 285eb77773..be645ec818 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -65,7 +65,7 @@ vm_call0_cfunc_with_frame(rb_execution_context_t* ec, struct rb_calling_info *ca { VALUE val; const rb_callable_method_entry_t *me = cc->me; - const rb_method_cfunc_t *cfunc = &me->def->body.cfunc; + const rb_method_cfunc_t *cfunc = UNALIGNED_MEMBER_PTR(me->def, body.cfunc); int len = cfunc->argc; VALUE recv = calling->recv; int argc = calling->argc; -- cgit v1.2.3