Skip to content

Commit 12b7b85

Browse files
committed
Use enum ruby_tag_type over int
1 parent 230c7de commit 12b7b85

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

eval.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ NORETURN(static void rb_raise_jump(VALUE, VALUE));
4343
void rb_ec_clear_current_thread_trace_func(const rb_execution_context_t *ec);
4444
void rb_ec_clear_all_trace_func(const rb_execution_context_t *ec);
4545

46-
static int rb_ec_cleanup(rb_execution_context_t *ec, int ex);
46+
static int rb_ec_cleanup(rb_execution_context_t *ec, enum ruby_tag_type ex);
4747
static int rb_ec_exec_node(rb_execution_context_t *ec, void *n);
4848

4949
VALUE rb_eLocalJumpError;
@@ -176,11 +176,11 @@ ruby_finalize(void)
176176
int
177177
ruby_cleanup(int ex)
178178
{
179-
return rb_ec_cleanup(GET_EC(), ex);
179+
return rb_ec_cleanup(GET_EC(), (enum ruby_tag_type)ex);
180180
}
181181

182182
static int
183-
rb_ec_cleanup(rb_execution_context_t *ec, int ex0)
183+
rb_ec_cleanup(rb_execution_context_t *ec, enum ruby_tag_type ex0)
184184
{
185185
int state;
186186
volatile VALUE errs[2] = { Qundef, Qundef };
@@ -189,7 +189,7 @@ rb_ec_cleanup(rb_execution_context_t *ec, int ex0)
189189
rb_thread_t *const volatile th0 = th;
190190
volatile int sysex = EXIT_SUCCESS;
191191
volatile int step = 0;
192-
volatile int ex = ex0;
192+
volatile enum ruby_tag_type ex = ex0;
193193

194194
rb_threadptr_interrupt(th);
195195
rb_threadptr_check_signal(th);

eval_error.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ sysexit_status(VALUE err)
433433
rb_bug("Unknown longjmp status %d", status)
434434

435435
static int
436-
error_handle(rb_execution_context_t *ec, int ex)
436+
error_handle(rb_execution_context_t *ec, enum ruby_tag_type ex)
437437
{
438438
int status = EXIT_FAILURE;
439439

0 commit comments

Comments
 (0)