Ruby 1.9.3p327(2012-11-10revision37606)
|
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 } rb_const_entry_t; 00023 00024 VALUE rb_mod_private_constant(int argc, VALUE *argv, VALUE obj); 00025 VALUE rb_mod_public_constant(int argc, VALUE *argv, VALUE obj); 00026 void rb_free_const_table(st_table *tbl); 00027 VALUE rb_public_const_get(VALUE klass, ID id); 00028 VALUE rb_public_const_get_at(VALUE klass, ID id); 00029 VALUE rb_public_const_get_from(VALUE klass, ID id); 00030 int rb_public_const_defined(VALUE klass, ID id); 00031 int rb_public_const_defined_at(VALUE klass, ID id); 00032 int rb_public_const_defined_from(VALUE klass, ID id); 00033 00034 #endif /* CONSTANT_H */ 00035