Ruby  2.5.0dev(2017-10-22revision60238)
constant.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  constant.h -
4 
5  $Author$
6  created at: Sun Nov 15 00:09:33 2009
7 
8  Copyright (C) 2009 Yusuke Endoh
9 
10 **********************************************************************/
11 #ifndef CONSTANT_H
12 #define CONSTANT_H
13 
14 typedef enum {
16 
18  CONST_PUBLIC = 0x00,
22 
23 #define RB_CONST_PRIVATE_P(ce) \
24  (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PRIVATE)
25 #define RB_CONST_PUBLIC_P(ce) \
26  (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PUBLIC)
27 
28 #define RB_CONST_DEPRECATED_P(ce) \
29  ((ce)->flag & CONST_DEPRECATED)
30 
31 typedef struct rb_const_entry_struct {
33  int line;
34  const VALUE value; /* should be mark */
35  const VALUE file; /* should be mark */
37 
41 void rb_free_const_table(struct rb_id_table *tbl);
45 int rb_public_const_defined(VALUE klass, ID id);
46 int rb_public_const_defined_at(VALUE klass, ID id);
49 
50 #endif /* CONSTANT_H */
VALUE rb_mod_public_constant(int argc, const VALUE *argv, VALUE obj)
Definition: variable.c:2786
Definition: constant.h:31
const VALUE file
Definition: constant.h:35
int rb_public_const_defined(VALUE klass, ID id)
Definition: variable.c:2555
const VALUE value
Definition: constant.h:34
int rb_public_const_defined_at(VALUE klass, ID id)
Definition: variable.c:2561
struct rb_const_entry_struct rb_const_entry_t
int line
Definition: constant.h:33
rb_const_flag_t
Definition: constant.h:14
rb_const_flag_t flag
Definition: constant.h:32
int rb_public_const_defined_from(VALUE klass, ID id)
Definition: variable.c:2549
int argc
Definition: ruby.c:187
unsigned long ID
Definition: ruby.h:86
unsigned long VALUE
Definition: ruby.h:85
void rb_free_const_table(struct rb_id_table *tbl)
Definition: gc.c:2140
rb_const_entry_t * rb_const_lookup(VALUE klass, ID id)
Definition: variable.c:3128
VALUE rb_public_const_get(VALUE klass, ID id)
Definition: variable.c:2310
VALUE rb_mod_private_constant(int argc, const VALUE *argv, VALUE obj)
Definition: variable.c:2772
VALUE rb_public_const_get_at(VALUE klass, ID id)
Definition: variable.c:2316
VALUE rb_public_const_get_from(VALUE klass, ID id)
Definition: variable.c:2304
VALUE rb_mod_deprecate_constant(int argc, const VALUE *argv, VALUE obj)
Definition: variable.c:2800
char ** argv
Definition: ruby.c:188