Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
constant.h
Go to the documentation of this file.
1#ifndef CONSTANT_H
2#define CONSTANT_H
3/**********************************************************************
4
5 constant.h -
6
7 $Author$
8 created at: Sun Nov 15 00:09:33 2009
9
10 Copyright (C) 2009 Yusuke Endoh
11
12**********************************************************************/
13#include "ruby/ruby.h"
14#include "id_table.h"
15
16typedef enum {
18
24
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)
29
30#define RB_CONST_DEPRECATED_P(ce) \
31 ((ce)->flag & CONST_DEPRECATED)
32
33typedef struct rb_const_entry_struct {
35 int line;
36 VALUE value; /* should be mark */
37 VALUE file; /* should be mark */
39
43void rb_free_const_table(struct rb_id_table *tbl);
45
54
55#endif /* CONSTANT_H */
rb_const_flag_t
Definition: constant.h:16
@ CONST_VISIBILITY_MAX
Definition: constant.h:22
@ CONST_DEPRECATED
Definition: constant.h:17
@ CONST_PRIVATE
Definition: constant.h:21
@ CONST_PUBLIC
Definition: constant.h:20
@ CONST_VISIBILITY_MASK
Definition: constant.h:19
VALUE rb_mod_public_constant(int argc, const VALUE *argv, VALUE obj)
Definition: variable.c:3255
VALUE rb_const_source_location(VALUE, ID)
Definition: variable.c:2694
int rb_autoloading_value(VALUE mod, ID id, VALUE *value, rb_const_flag_t *flag)
Definition: variable.c:2299
VALUE rb_mod_private_constant(int argc, const VALUE *argv, VALUE obj)
Definition: variable.c:3241
VALUE rb_public_const_get_at(VALUE klass, ID id)
Definition: variable.c:2642
struct rb_const_entry_struct rb_const_entry_t
rb_const_entry_t * rb_const_lookup(VALUE klass, ID id)
Definition: variable.c:3614
int rb_public_const_defined_from(VALUE klass, ID id)
Definition: variable.c:2940
VALUE rb_const_source_location_at(VALUE, ID)
Definition: variable.c:2700
void rb_free_const_table(struct rb_id_table *tbl)
Definition: gc.c:2595
VALUE rb_public_const_get_from(VALUE klass, ID id)
Definition: variable.c:2636
VALUE rb_mod_deprecate_constant(int argc, const VALUE *argv, VALUE obj)
Definition: variable.c:3281
#define mod(x, y)
Definition: date_strftime.c:28
#define MJIT_SYMBOL_EXPORT_END
Definition: dllexport.h:63
#define MJIT_SYMBOL_EXPORT_BEGIN
Definition: dllexport.h:62
int argc
Definition: ruby.c:240
char ** argv
Definition: ruby.c:241
Definition: constant.h:33
VALUE value
Definition: constant.h:36
rb_const_flag_t flag
Definition: constant.h:34
VALUE file
Definition: constant.h:37
int line
Definition: constant.h:35
unsigned long VALUE
Definition: value.h:38
unsigned long ID
Definition: value.h:39