Ruby  2.0.0p247(2013-06-27revision41674)
constant.h
Go to the documentation of this file.
00001 /**********************************************************************
00002 
00003   constant.h -
00004 
00005   $Author$
00006   created at: Sun Nov 15 00:09:33 2009
00007 
00008   Copyright (C) 2009 Yusuke Endoh
00009 
00010 **********************************************************************/
00011 #ifndef CONSTANT_H
00012 #define CONSTANT_H
00013 
00014 typedef enum {
00015     CONST_PUBLIC    = 0x00,
00016     CONST_PRIVATE   = 0x01
00017 } rb_const_flag_t;
00018 
00019 typedef struct rb_const_entry_struct {
00020     rb_const_flag_t flag;
00021     VALUE value;            /* should be mark */
00022     VALUE file;
00023     int line;
00024 } rb_const_entry_t;
00025 
00026 VALUE rb_mod_private_constant(int argc, VALUE *argv, VALUE obj);
00027 VALUE rb_mod_public_constant(int argc, VALUE *argv, VALUE obj);
00028 void rb_free_const_table(st_table *tbl);
00029 VALUE rb_public_const_get(VALUE klass, ID id);
00030 VALUE rb_public_const_get_at(VALUE klass, ID id);
00031 VALUE rb_public_const_get_from(VALUE klass, ID id);
00032 int rb_public_const_defined(VALUE klass, ID id);
00033 int rb_public_const_defined_at(VALUE klass, ID id);
00034 int rb_public_const_defined_from(VALUE klass, ID id);
00035 
00036 #endif /* CONSTANT_H */
00037