From 02fe713b46a5f2365a2eccf0064b6116d7117e8e Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 8 Oct 2014 08:27:51 +0000 Subject: 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 --- constant.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'constant.h') diff --git a/constant.h b/constant.h index 8c854bfffa..c7de5da533 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; -- cgit v1.2.3