summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-05 15:32:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-05 15:32:35 +0000
commit8a2621ddc2af26e5afb58ec17897fe818631f03c (patch)
tree8833a7eea6354c7a337f1ce03a59bcad8ab825ba
parentb2b5a5db0925f94220897813a552aa7d4ec2fd11 (diff)
eval_intern.h: use TH_TMPPOP_TAG and TH_REPUSH_TAG
* eval_intern.h (TH_TMPPOP_TAG, TH_REPUSH_TAG): instead of TAG2 names. * eval_intern.h (TH_REPUSH_TAG): suppress unused-value warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--eval_intern.h10
-rw-r--r--vm.c2
2 files changed, 4 insertions, 8 deletions
diff --git a/eval_intern.h b/eval_intern.h
index a0ecb50..69e9134 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -120,14 +120,10 @@ extern int select_large_fdset(int, fd_set *, fd_set *, fd_set *, struct timeval
_th->tag = _tag.prev; \
} while (0)
-#define TH_POP_TAG2() \
+#define TH_TMPPOP_TAG() \
_th->tag = _tag.prev
-#define TH_PUSH_TAG2() (_th->tag = &_tag, 0)
-
-#define TH_TMPPOP_TAG() TH_POP_TAG2()
-
-#define TH_REPUSH_TAG() TH_PUSH_TAG2()
+#define TH_REPUSH_TAG() (void)(_th->tag = &_tag)
#define PUSH_TAG() TH_PUSH_TAG(GET_THREAD())
#define POP_TAG() TH_POP_TAG()
@@ -153,7 +149,7 @@ rb_threadptr_tag_jump(rb_thread_t *th, int st)
[ISO/IEC 9899:1999] 7.13.1.1
*/
#define TH_EXEC_TAG() \
- (ruby_setjmp(_tag.buf) ? rb_threadptr_tag_state(_th) : TH_PUSH_TAG2())
+ (ruby_setjmp(_tag.buf) ? rb_threadptr_tag_state(_th) : (TH_REPUSH_TAG(), 0))
#define EXEC_TAG() \
TH_EXEC_TAG()
diff --git a/vm.c b/vm.c
index 7d792b8..36fd511 100644
--- a/vm.c
+++ b/vm.c
@@ -1543,7 +1543,7 @@ vm_exec(rb_thread_t *th)
if (VM_FRAME_TYPE_FINISH_P(th->cfp)) {
vm_pop_frame(th);
th->errinfo = err;
- TH_POP_TAG2();
+ TH_TMPPOP_TAG();
JUMP_TAG(state);
}
else {