1 /** \noop-*-C++-*-vi:ft=cpp
3 * @author Ruby developers <ruby-core@ruby-lang.org>
4 * @copyright This file is a part of the programming language Ruby.
5 * Permission is hereby granted, to either redistribute and/or
6 * modify this file, provided that the conditions mentioned in the
7 * file COPYING are met. Consult the file for details.
8 * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
9 * implementation details. Don't take them as canon. They could
10 * rapidly appear then vanish. The name (path) of this header file
11 * is also an implementation detail. Do not expect it to persist
12 * at the place it is now. Developers are free to move it anywhere
14 * @note To ruby-core: remember that this header can be possibly
15 * recursively included from extension libraries written in C++.
16 * Do not expect for instance `__VA_ARGS__` is always available.
17 * We assume C99 for ruby itself but we don't assume languages of
18 * extension libraries. They could be written in C++98.
19 * @brief Public APIs related to names inside of a Ruby program.
21 #ifndef RUBY3_INTERN_VARIABLE_H
22 #define RUBY3_INTERN_VARIABLE_H
23 #include "ruby/3/attr/noreturn.h"
24 #include "ruby/3/dllexport.h"
25 #include "ruby/3/value.h"
28 RUBY3_SYMBOL_EXPORT_BEGIN()
31 VALUE
rb_mod_name(VALUE
);
32 VALUE
rb_class_path(VALUE
);
33 VALUE
rb_class_path_cached(VALUE
);
34 void rb_set_class_path(VALUE
, VALUE
, const char*);
35 void rb_set_class_path_string(VALUE
, VALUE
, VALUE
);
36 VALUE
rb_path_to_class(VALUE
);
37 VALUE
rb_path2class(const char*);
38 VALUE
rb_class_name(VALUE
);
39 VALUE
rb_autoload_load(VALUE
, ID
);
40 VALUE
rb_autoload_p(VALUE
, ID
);
41 VALUE
rb_f_trace_var(int, const VALUE
*);
42 VALUE
rb_f_untrace_var(int, const VALUE
*);
43 VALUE
rb_f_global_variables(void);
44 void rb_alias_variable(ID
, ID
);
45 void rb_copy_generic_ivar(VALUE
,VALUE
);
46 void rb_free_generic_ivar(VALUE
);
47 VALUE
rb_ivar_get(VALUE
, ID
);
48 VALUE
rb_ivar_set(VALUE
, ID
, VALUE
);
49 VALUE
rb_ivar_defined(VALUE
, ID
);
50 void rb_ivar_foreach(VALUE
, int (*)(ID
, VALUE
, st_data_t
), st_data_t
);
51 st_index_t
rb_ivar_count(VALUE
);
52 VALUE
rb_attr_get(VALUE
, ID
);
53 VALUE
rb_obj_instance_variables(VALUE
);
54 VALUE
rb_obj_remove_instance_variable(VALUE
, VALUE
);
55 void *rb_mod_const_at(VALUE
, void*);
56 void *rb_mod_const_of(VALUE
, void*);
57 VALUE
rb_const_list(void*);
58 VALUE
rb_mod_constants(int, const VALUE
*, VALUE
);
59 VALUE
rb_mod_remove_const(VALUE
, VALUE
);
60 int rb_const_defined(VALUE
, ID
);
61 int rb_const_defined_at(VALUE
, ID
);
62 int rb_const_defined_from(VALUE
, ID
);
63 VALUE
rb_const_get(VALUE
, ID
);
64 VALUE
rb_const_get_at(VALUE
, ID
);
65 VALUE
rb_const_get_from(VALUE
, ID
);
66 void rb_const_set(VALUE
, ID
, VALUE
);
67 VALUE
rb_const_remove(VALUE
, ID
);
68 #if 0 /* EXPERIMENTAL: remove if no problem */
70 VALUE
rb_mod_const_missing(VALUE
,VALUE
);
72 VALUE
rb_cvar_defined(VALUE
, ID
);
73 void rb_cvar_set(VALUE
, ID
, VALUE
);
74 VALUE
rb_cvar_get(VALUE
, ID
);
75 void rb_cv_set(VALUE
, const char*, VALUE
);
76 VALUE
rb_cv_get(VALUE
, const char*);
77 void rb_define_class_variable(VALUE
, const char*, VALUE
);
78 VALUE
rb_mod_class_variables(int, const VALUE
*, VALUE
);
79 VALUE
rb_mod_remove_cvar(VALUE
, VALUE
);
81 RUBY3_SYMBOL_EXPORT_END()
83 #endif /* RUBY3_INTERN_VARIABLE_H */