1#ifndef INTERNAL_STRUCT_H
2#define INTERNAL_STRUCT_H
13#include "internal/gc.h"
34#define RSTRUCT(obj) ((struct RStruct *)(obj))
52#define RSTRUCT_LEN internal_RSTRUCT_LEN
53#define RSTRUCT_SET internal_RSTRUCT_SET
54#define RSTRUCT_GET internal_RSTRUCT_GET
60static inline const VALUE *rb_struct_const_heap_ptr(
VALUE st);
61static inline bool RSTRUCT_TRANSIENT_P(
VALUE st);
62static inline void RSTRUCT_TRANSIENT_SET(
VALUE st);
63static inline void RSTRUCT_TRANSIENT_UNSET(
VALUE st);
64static inline long RSTRUCT_EMBED_LEN(
VALUE st);
66static inline int RSTRUCT_LENINT(
VALUE st);
67static inline const VALUE *RSTRUCT_CONST_PTR(
VALUE st);
72RSTRUCT_TRANSIENT_P(
VALUE st)
82RSTRUCT_TRANSIENT_SET(
VALUE st)
90RSTRUCT_TRANSIENT_UNSET(
VALUE st)
98RSTRUCT_EMBED_LEN(
VALUE st)
109 return RSTRUCT_EMBED_LEN(st);
112 return RSTRUCT(st)->as.heap.len;
117RSTRUCT_LENINT(
VALUE st)
122static inline const VALUE *
123RSTRUCT_CONST_PTR(
VALUE st)
144 return RSTRUCT_CONST_PTR(st)[k];
147static inline const VALUE *
148rb_struct_const_heap_ptr(
VALUE st)
151 return RSTRUCT(st)->as.heap.ptr;
VALUE rb_struct_init_copy(VALUE copy, VALUE s)
VALUE rb_struct_lookup(VALUE s, VALUE idx)
@ RSTRUCT_EMBED_LEN_SHIFT
VALUE rb_struct_s_keyword_init(VALUE klass)
#define RVALUE_EMBED_LEN_MAX
#define RB_OBJ_WRITE(a, slot, b)
WB for new reference from ‘a’ to ‘b’.
const VALUE ary[RSTRUCT_EMBED_LEN_MAX]
struct RStruct::@117::@118 heap