3 /**********************************************************************
8 created at: Sun Nov 15 00:09:33 2009
10 Copyright (C) 2009 Yusuke Endoh
12 **********************************************************************/
13 #include "ruby/ruby.h"
17 CONST_DEPRECATED
= 0x100,
19 CONST_VISIBILITY_MASK
= 0xff,
25 #define RB_CONST_PRIVATE_P(ce) \
26 (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PRIVATE)
27 #define RB_CONST_PUBLIC_P(ce) \
28 (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PUBLIC)
30 #define RB_CONST_DEPRECATED_P(ce) \
31 ((ce)->flag & CONST_DEPRECATED)
33 typedef struct rb_const_entry_struct
{
36 VALUE value
; /* should be mark */
37 VALUE file
; /* should be mark */
40 VALUE
rb_mod_private_constant(int argc
, const VALUE
*argv
, VALUE obj
);
41 VALUE
rb_mod_public_constant(int argc
, const VALUE
*argv
, VALUE obj
);
42 VALUE
rb_mod_deprecate_constant(int argc
, const VALUE
*argv
, VALUE obj
);
43 void rb_free_const_table(struct rb_id_table
*tbl
);
44 VALUE
rb_const_source_location(VALUE
, ID
);
46 MJIT_SYMBOL_EXPORT_BEGIN
47 int rb_autoloading_value(VALUE mod
, ID id
, VALUE
*value
, rb_const_flag_t
*flag
);
48 rb_const_entry_t
*rb_const_lookup(VALUE klass
, ID id
);
49 VALUE
rb_public_const_get_at(VALUE klass
, ID id
);
50 VALUE
rb_public_const_get_from(VALUE klass
, ID id
);
51 int rb_public_const_defined_from(VALUE klass
, ID id
);
52 VALUE
rb_const_source_location_at(VALUE
, ID
);
53 MJIT_SYMBOL_EXPORT_END
55 #endif /* CONSTANT_H */