mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02:00
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
This commit is contained in:
parent
1d248f0429
commit
2108e55c0b
16 changed files with 105 additions and 105 deletions
|
@ -149,6 +149,7 @@
|
|||
typedef unsigned long rb_num_t;
|
||||
|
||||
enum ruby_tag_type {
|
||||
RUBY_TAG_NONE = 0x0,
|
||||
RUBY_TAG_RETURN = 0x1,
|
||||
RUBY_TAG_BREAK = 0x2,
|
||||
RUBY_TAG_NEXT = 0x3,
|
||||
|
@ -159,6 +160,8 @@ enum ruby_tag_type {
|
|||
RUBY_TAG_FATAL = 0x8,
|
||||
RUBY_TAG_MASK = 0xf
|
||||
};
|
||||
|
||||
#define TAG_NONE RUBY_TAG_NONE
|
||||
#define TAG_RETURN RUBY_TAG_RETURN
|
||||
#define TAG_BREAK RUBY_TAG_BREAK
|
||||
#define TAG_NEXT RUBY_TAG_NEXT
|
||||
|
@ -741,7 +744,7 @@ typedef struct rb_thread_struct {
|
|||
VALUE last_status; /* $? */
|
||||
|
||||
/* passing state */
|
||||
int state;
|
||||
enum ruby_tag_type state;
|
||||
|
||||
/* for rb_iterate */
|
||||
VALUE passed_block_handler;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue