mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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
This commit is contained in:
parent
1ba17d0e91
commit
02fe713b46
2 changed files with 10 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue