summaryrefslogtreecommitdiff
path: root/eval_jump.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-23 07:25:52 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-23 07:25:52 +0000
commit2108e55c0b8fd31cec8968868a56876a22f3104c (patch)
tree479ee29eaecd26251ee6c4a783ad9c52db7f541f /eval_jump.c
parent1d248f04294bf5916f54168ee28cc42471132c54 (diff)
downloadruby-2108e55c0b8fd31cec8968868a56876a22f3104c.tar.gz
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
Diffstat (limited to 'eval_jump.c')
-rw-r--r--eval_jump.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/eval_jump.c b/eval_jump.c
index 59dae109ce..37f5ab591d 100644
--- a/eval_jump.c
+++ b/eval_jump.c
@@ -113,13 +113,13 @@ exec_end_procs_chain(struct end_proc_data *volatile *procs, VALUE *errp)
void
rb_exec_end_proc(void)
{
- int status;
+ enum ruby_tag_type state;
volatile int safe = rb_safe_level();
rb_thread_t *th = GET_THREAD();
volatile VALUE errinfo = th->errinfo;
TH_PUSH_TAG(th);
- if ((status = EXEC_TAG()) == 0) {
+ if ((state = EXEC_TAG()) == TAG_NONE) {
again:
exec_end_procs_chain(&ephemeral_end_procs, &th->errinfo);
exec_end_procs_chain(&end_procs, &th->errinfo);
@@ -127,7 +127,7 @@ rb_exec_end_proc(void)
else {
VAR_INITIALIZED(th);
TH_TMPPOP_TAG();
- error_handle(status);
+ error_handle(state);
if (!NIL_P(th->errinfo)) errinfo = th->errinfo;
TH_REPUSH_TAG();
goto again;