diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-22 04:04:06 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-22 04:04:06 +0000 |
commit | 84fd997fe6460e5fcccbae557e95068cf94cd55d (patch) | |
tree | 033171b77cdbf50683e12d0f0d54edc46413be4e | |
parent | d4313df0851e85a4bd3343b44932195953cbd6bf (diff) | |
download | ruby-84fd997fe6460e5fcccbae557e95068cf94cd55d.tar.gz |
Avoid compiler depend error
ref r64492
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | cont.c | 2 | ||||
-rw-r--r-- | internal.h | 6 | ||||
-rw-r--r-- | method.h | 4 | ||||
-rw-r--r-- | vm_core.h | 2 |
4 files changed, 7 insertions, 7 deletions
@@ -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". diff --git a/internal.h b/internal.h index 20df1453e2..de62de1029 100644 --- a/internal.h +++ b/internal.h @@ -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; |