From 919c7802999ce403bb91c9c47e5e707d1ee6342a Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 23 Jun 2017 07:25:52 +0000 Subject: use "enum ruby_tag_type" and TAG_NONE. Return value of EXEC_TAG() is saved by "int state". Instead of "int", use "enum ruby_tag_type". First EXEC_TAG() value should be 0, so that define TAG_NONE (= 0) and use it. Some code used "status" instead of "state". To make them clear, rename them to state. We can change variable name from "state" to "tag_state", but this ticket doesn't contain it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'signal.c') diff --git a/signal.c b/signal.c index 7baf742929..f2fd0575d7 100644 --- a/signal.c +++ b/signal.c @@ -991,7 +991,7 @@ signal_exec(VALUE cmd, int safe, int sig) { rb_thread_t *cur_th = GET_THREAD(); volatile unsigned long old_interrupt_mask = cur_th->interrupt_mask; - int state; + enum ruby_tag_type state; /* * workaround the following race: @@ -1004,7 +1004,7 @@ signal_exec(VALUE cmd, int safe, int sig) cur_th->interrupt_mask |= TRAP_INTERRUPT_MASK; TH_PUSH_TAG(cur_th); - if ((state = EXEC_TAG()) == 0) { + if ((state = EXEC_TAG()) == TAG_NONE) { VALUE signum = INT2NUM(sig); rb_eval_cmd(cmd, rb_ary_new3(1, signum), safe); } -- cgit v1.2.3