summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2020-12-21 21:16:19 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2020-12-21 21:16:39 -0800
commit692af8e8f8b5f9965450d8f2577f435feaa6f80d (patch)
tree26109e5f22a0a66368a11c307cb20368cbc94bbc /vm.c
parent03f2b093201762031d5be64d0cce85da26c1d3b3 (diff)
Prefer stdbool in vm_exec
Make the code a bit modern and consistent with some other places.
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/vm.c b/vm.c
index 5fc0338..3e775f8 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;
}