Ruby 3.5.0dev (2025-05-22 revision 7154b4208be5fbc314ba2aac765c6f1530e2ada6)
variable.h
1#ifndef INTERNAL_VARIABLE_H /*-*-C-*-vi:se ft=c:*/
2#define INTERNAL_VARIABLE_H
11#include "ruby/internal/config.h"
12#include <stddef.h> /* for size_t */
13#include "constant.h" /* for rb_const_entry_t */
14#include "ruby/internal/stdbool.h" /* for bool */
15#include "ruby/ruby.h" /* for VALUE */
16#include "shape.h" /* for rb_shape_t */
17
18/* variable.c */
19void rb_gc_mark_global_tbl(void);
20void rb_gc_update_global_tbl(void);
21size_t rb_generic_ivar_memsize(VALUE);
22VALUE rb_search_class_path(VALUE);
23VALUE rb_attr_delete(VALUE, ID);
24void rb_autoload_str(VALUE mod, ID id, VALUE file);
25VALUE rb_autoload_at_p(VALUE, ID, int);
26void rb_autoload_copy_table_for_namespace(st_table *, const rb_namespace_t *);
27NORETURN(VALUE rb_mod_const_missing(VALUE,VALUE));
28rb_gvar_getter_t *rb_gvar_getter_function_of(ID);
29rb_gvar_setter_t *rb_gvar_setter_function_of(ID);
31void rb_gvar_ractor_local(const char *name);
32void rb_gvar_namespace_ready(const char *name);
33
48VALUE rb_mod_set_temporary_name(VALUE, VALUE);
49
50struct gen_fields_tbl;
51int rb_gen_fields_tbl_get(VALUE obj, ID id, struct gen_fields_tbl **fields_tbl);
52void rb_obj_copy_ivs_to_hash_table(VALUE obj, st_table *table);
53void rb_obj_init_too_complex(VALUE obj, st_table *table);
54void rb_evict_ivars_to_hash(VALUE obj);
55void rb_evict_fields_to_hash(VALUE obj);
56VALUE rb_obj_field_get(VALUE obj, shape_id_t target_shape_id);
57void rb_ivar_set_internal(VALUE obj, ID id, VALUE val);
58void rb_obj_field_set(VALUE obj, shape_id_t target_shape_id, VALUE val);
59
60RUBY_SYMBOL_EXPORT_BEGIN
61/* variable.c (export) */
62void rb_mark_generic_ivar(VALUE obj);
63VALUE rb_const_missing(VALUE klass, VALUE name);
64int rb_class_ivar_set(VALUE klass, ID vid, VALUE value);
65void rb_fields_tbl_copy(VALUE dst, VALUE src);
66RUBY_SYMBOL_EXPORT_END
67
68VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef);
69VALUE rb_gvar_get(ID);
70VALUE rb_gvar_set(ID, VALUE);
71VALUE rb_gvar_defined(ID);
72void rb_const_warn_if_deprecated(const rb_const_entry_t *, VALUE, ID);
73void rb_ensure_iv_list_size(VALUE obj, uint32_t len, uint32_t newsize);
74attr_index_t rb_obj_ivar_set(VALUE obj, ID id, VALUE val);
75
76#endif /* INTERNAL_VARIABLE_H */
void rb_gvar_setter_t(VALUE val, ID id, VALUE *data)
Type that represents a global variable setter function.
Definition variable.h:46
rb_gvar_setter_t rb_gvar_readonly_setter
This function just raises rb_eNameError.
Definition variable.h:135
VALUE rb_gvar_getter_t(ID id, VALUE *data)
Type that represents a global variable getter function.
Definition variable.h:37
int len
Length of the buffer.
Definition io.h:8
#define _(args)
This was a transition path from K&R to ANSI.
Definition stdarg.h:35
C99 shim for <stdbool.h>
Definition constant.h:33
Internal header for Namespace.
Definition namespace.h:14
Definition st.h:79
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition value.h:52
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40