Ruby: variable.h Source File

Ruby 3.3.7p123 (2025-01-15 revision be31f993d7fa0219d85f7b3c694d454da4ecc10b)

variable.h
1#ifndef RUBY_TOPLEVEL_VARIABLE_H /*-*-C-*-vi:se ft=c:*/
2#define RUBY_TOPLEVEL_VARIABLE_H
10
11/* per-object */
12
13#include "shape.h"
14
15 struct gen_ivtbl {
16#if !SHAPE_IN_BASIC_FLAGS
17 uint16_t shape_id;
18#endif
19 union {
20 struct {
21 uint32_t numiv;
22 VALUE ivptr[1];
23 } shape;
24 struct {
25 st_table *table;
26 } complex;
27 } as;
28};
29
30int rb_ivar_generic_ivtbl_lookup(VALUE obj, struct gen_ivtbl **);
31
32#if !SHAPE_IN_BASIC_FLAGS
33shape_id_t rb_generic_shape_id(VALUE obj);
34#endif
35
36void rb_free_rb_global_tbl(void);
37void rb_free_generic_iv_tbl_(void);
38
39#endif /* RUBY_TOPLEVEL_VARIABLE_H */
gen_ivtbl
Definition variable.h:15
st_table
Definition st.h:79
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40