aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-18 18:19:11 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-20 20:00:40 +0900
commit12b7b852272c23d8449af507405ac93cedcb6dd6 (patch)
tree1c7f4e16480409967b05d06cd4b8f1ed5a5c806e /eval.c
parent230c7de2529a0a29b5814e015d7cb66c3157513b (diff)
downloadruby-12b7b852272c23d8449af507405ac93cedcb6dd6.tar.gz
Use `enum ruby_tag_type` over `int`
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/eval.c b/eval.c
index c95c3fb9ed..94177e1d79 100644
--- a/eval.c
+++ b/eval.c
@@ -43,7 +43,7 @@ NORETURN(static void rb_raise_jump(VALUE, VALUE));
void rb_ec_clear_current_thread_trace_func(const rb_execution_context_t *ec);
void rb_ec_clear_all_trace_func(const rb_execution_context_t *ec);
-static int rb_ec_cleanup(rb_execution_context_t *ec, int ex);
+static int rb_ec_cleanup(rb_execution_context_t *ec, enum ruby_tag_type ex);
static int rb_ec_exec_node(rb_execution_context_t *ec, void *n);
VALUE rb_eLocalJumpError;
@@ -176,11 +176,11 @@ ruby_finalize(void)
int
ruby_cleanup(int ex)
{
- return rb_ec_cleanup(GET_EC(), ex);
+ return rb_ec_cleanup(GET_EC(), (enum ruby_tag_type)ex);
}
static int
-rb_ec_cleanup(rb_execution_context_t *ec, int ex0)
+rb_ec_cleanup(rb_execution_context_t *ec, enum ruby_tag_type ex0)
{
int state;
volatile VALUE errs[2] = { Qundef, Qundef };
@@ -189,7 +189,7 @@ rb_ec_cleanup(rb_execution_context_t *ec, int ex0)
rb_thread_t *const volatile th0 = th;
volatile int sysex = EXIT_SUCCESS;
volatile int step = 0;
- volatile int ex = ex0;
+ volatile enum ruby_tag_type ex = ex0;
rb_threadptr_interrupt(th);
rb_threadptr_check_signal(th);