ref r64492

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2018-08-22 04:04:06 +00:00
Родитель d4313df085
Коммит 84fd997fe6
4 изменённых файлов: 7 добавлений и 7 удалений

2
cont.c
Просмотреть файл

@ -175,7 +175,7 @@ struct rb_fiber_struct {
rb_context_t cont;
VALUE first_proc;
struct rb_fiber_struct *prev;
BITFIELD(enum fiber_status) status : 2;
BITFIELD(enum fiber_status, status, 2);
/* If a fiber invokes "transfer",
* then this fiber can't "resume" any more after that.
* You shouldn't mix "transfer" and "resume".

Просмотреть файл

@ -2144,14 +2144,14 @@ rb_obj_builtin_type(VALUE obj)
/*
* For declaring bitfields out of non-unsigned int types:
* struct date {
* BITFIELD(enum months) month:4;
* BITFIELD(enum months, month, 4);
* ...
* };
*/
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
# define BITFIELD(type) type
# define BITFIELD(type, name, size) type name : size
#else
# define BITFIELD(type) unsigned int
# define BITFIELD(type, name, size) unsigned int name : size
#endif
#if defined(_MSC_VER)

Просмотреть файл

@ -33,7 +33,7 @@ typedef enum {
} rb_method_visibility_t;
typedef struct rb_scope_visi_struct {
BITFIELD(rb_method_visibility_t) method_visi : 3;
BITFIELD(rb_method_visibility_t, method_visi, 3);
unsigned int module_func : 1;
} rb_scope_visibility_t;
@ -155,7 +155,7 @@ enum method_optimized_type {
};
PACKED_STRUCT_UNALIGNED(struct rb_method_definition_struct {
BITFIELD(rb_method_type_t) type : VM_METHOD_TYPE_MINIMUM_BITS;
BITFIELD(rb_method_type_t, type, VM_METHOD_TYPE_MINIMUM_BITS);
int alias_count : 28;
int complemented_count : 28;

Просмотреть файл

@ -879,7 +879,7 @@ typedef struct rb_thread_struct {
#ifdef NON_SCALAR_THREAD_ID
rb_thread_id_string_t thread_id_string;
#endif
BITFIELD(enum rb_thread_status) status : 2;
BITFIELD(enum rb_thread_status, status, 2);
/* bit flags */
unsigned int to_kill : 1;
unsigned int abort_on_exception: 1;