summaryrefslogtreecommitdiff
path: root/method.h
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-27 21:04:42 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-27 21:04:42 +0000
commit46bfa65fccf58cee280bf552193f93388b00d16d (patch)
tree02e80407cd7a19697e9b6b606db2d2f7733ac21b /method.h
parent6cf78f0e6786cf0074c68302594bd6964f6b3ca8 (diff)
internal.h: add BITFIELD macro to aid C99 users
I plan to use this macro to pack other enums in the VM. * internal.h: add BITFIELD macro * method.h: use BITFIELD for rb_method_visibility_t [ruby-core:85074] [Misc #14395] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'method.h')
-rw-r--r--method.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/method.h b/method.h
index 83f3acac06..e2d121d9b8 100644
--- a/method.h
+++ b/method.h
@@ -32,16 +32,10 @@ typedef enum {
METHOD_VISI_MASK = 0x03
} rb_method_visibility_t;
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
-#define bits_t rb_method_visibility_t
-#else
-#define bits_t unsigned int
-#endif
typedef struct rb_scope_visi_struct {
- bits_t method_visi : 3;
+ BITFIELD(rb_method_visibility_t) method_visi : 3;
unsigned int module_func : 1;
} rb_scope_visibility_t;
-#undef bits_t
/*! CREF (Class REFerence) */
typedef struct rb_cref_struct {