From 692af8e8f8b5f9965450d8f2577f435feaa6f80d Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 21 Dec 2020 21:16:19 -0800 Subject: Prefer stdbool in vm_exec Make the code a bit modern and consistent with some other places. --- vm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'vm.c') diff --git a/vm.c b/vm.c index 5fc0338334..3e775f8a5f 100644 --- a/vm.c +++ b/vm.c @@ -57,7 +57,7 @@ RUBY_FUNC_EXPORTED #else MJIT_FUNC_EXPORTED #endif -VALUE vm_exec(rb_execution_context_t *, int); +VALUE vm_exec(rb_execution_context_t *, bool); PUREFUNC(static inline const VALUE *VM_EP_LEP(const VALUE *)); static inline const VALUE * @@ -1262,7 +1262,7 @@ invoke_block(rb_execution_context_t *ec, const rb_iseq_t *iseq, VALUE self, cons ec->cfp->sp + arg_size, iseq->body->local_table_size - arg_size, iseq->body->stack_max); - return vm_exec(ec, TRUE); + return vm_exec(ec, true); } static VALUE @@ -1292,7 +1292,7 @@ invoke_bmethod(rb_execution_context_t *ec, const rb_iseq_t *iseq, VALUE self, co me->def->original_id, me->called_id, me->owner, Qnil, FALSE); } VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH); - ret = vm_exec(ec, TRUE); + ret = vm_exec(ec, true); EXEC_EVENT_HOOK(ec, RUBY_EVENT_RETURN, self, me->def->original_id, me->called_id, me->owner, ret); if ((hooks = me->def->body.bmethod.hooks) != NULL && @@ -2151,7 +2151,7 @@ vm_exec_handle_exception(rb_execution_context_t *ec, enum ruby_tag_type state, VALUE errinfo, VALUE *initial); VALUE -vm_exec(rb_execution_context_t *ec, int mjit_enable_p) +vm_exec(rb_execution_context_t *ec, bool mjit_enable_p) { enum ruby_tag_type state; VALUE result = Qundef; @@ -2408,7 +2408,7 @@ rb_iseq_eval(const rb_iseq_t *iseq) rb_execution_context_t *ec = GET_EC(); VALUE val; vm_set_top_stack(ec, iseq); - val = vm_exec(ec, TRUE); + val = vm_exec(ec, true); return val; } @@ -2419,7 +2419,7 @@ rb_iseq_eval_main(const rb_iseq_t *iseq) VALUE val; vm_set_main_stack(ec, iseq); - val = vm_exec(ec, TRUE); + val = vm_exec(ec, true); return val; } -- cgit v1.2.3