Ruby 2.7.7p221 (2022-11-24 revision 168ec2b1e5ad0e4688e963d9de019557c78feed9)
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
14typedef enum {
16
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
31typedef struct rb_const_entry_struct {
33 int line;
34 VALUE value; /* should be mark */
35 VALUE file; /* should be mark */
37
41void rb_free_const_table(struct rb_id_table *tbl);
49
50#endif /* CONSTANT_H */
rb_const_flag_t
Definition: constant.h:14
@ CONST_VISIBILITY_MAX
Definition: constant.h:20
@ CONST_DEPRECATED
Definition: constant.h:15
@ CONST_PRIVATE
Definition: constant.h:19
@ CONST_PUBLIC
Definition: constant.h:18
@ CONST_VISIBILITY_MASK
Definition: constant.h:17
VALUE rb_mod_public_constant(int argc, const VALUE *argv, VALUE obj)
Definition: variable.c:2996
VALUE rb_const_source_location(VALUE, ID)
Definition: variable.c:2461
int rb_autoloading_value(VALUE mod, ID id, VALUE *value, rb_const_flag_t *flag)
Definition: variable.c:2078
VALUE rb_mod_private_constant(int argc, const VALUE *argv, VALUE obj)
Definition: variable.c:2982
VALUE rb_public_const_get_at(VALUE klass, ID id)
Definition: variable.c:2409
struct rb_const_entry_struct rb_const_entry_t
rb_const_entry_t * rb_const_lookup(VALUE klass, ID id)
Definition: variable.c:3352
int rb_public_const_defined_from(VALUE klass, ID id)
Definition: variable.c:2698
VALUE rb_const_source_location_at(VALUE, ID)
Definition: variable.c:2467
void rb_free_const_table(struct rb_id_table *tbl)
Definition: gc.c:2506
VALUE rb_public_const_get_from(VALUE klass, ID id)
Definition: variable.c:2403
VALUE rb_mod_deprecate_constant(int argc, const VALUE *argv, VALUE obj)
Definition: variable.c:3022
#define mod(x, y)
Definition: date_strftime.c:28
const VALUE VALUE obj
const VALUE * argv
unsigned long ID
unsigned long VALUE
Definition: ruby.h:102
VALUE value
rb_const_flag_t flag
VALUE file
int line