summaryrefslogtreecommitdiff
path: root/constant.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-08 08:27:51 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-08 08:27:51 (GMT)
commit02fe713b46a5f2365a2eccf0064b6116d7117e8e (patch)
tree9123de4e6dd6eb357a642e3d251707fcd7d040c4 /constant.h
parent1ba17d0e91bb22f22586868e94ec1acfb3bba565 (diff)
constant.h: constant visibilities
* constant.h (RB_CONST_PRIVATE_P, RB_CONST_PUBLIC_P): macros to predicate constant visibilities. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'constant.h')
-rw-r--r--constant.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/constant.h b/constant.h
index 8c854bf..c7de5da 100644
--- a/constant.h
+++ b/constant.h
@@ -13,9 +13,15 @@
typedef enum {
CONST_PUBLIC = 0x00,
- CONST_PRIVATE = 0x01
+ CONST_PRIVATE,
+ CONST_VISIBILITY_MAX
} rb_const_flag_t;
+#define RB_CONST_PRIVATE_P(ce) \
+ ((ce)->flag == CONST_PRIVATE)
+#define RB_CONST_PUBLIC_P(ce) \
+ ((ce)->flag == CONST_PUBLIC)
+
typedef struct rb_const_entry_struct {
rb_const_flag_t flag;
int line;