1#ifndef INTERNAL_STRUCT_H
2#define INTERNAL_STRUCT_H
36#define RSTRUCT(obj) ((struct RStruct *)(obj))
54#define RSTRUCT_LEN internal_RSTRUCT_LEN
55#define RSTRUCT_SET internal_RSTRUCT_SET
56#define RSTRUCT_GET internal_RSTRUCT_GET
62static inline long RSTRUCT_EMBED_LEN(
VALUE st);
63static inline long RSTRUCT_LEN(
VALUE st);
64static inline int RSTRUCT_LENINT(
VALUE st);
65static inline const VALUE *RSTRUCT_CONST_PTR(
VALUE st);
66static inline void RSTRUCT_SET(
VALUE st,
long k,
VALUE v);
67static inline VALUE RSTRUCT_GET(
VALUE st,
long k);
70RSTRUCT_EMBED_LEN(
VALUE st)
73 ret >>= RSTRUCT_EMBED_LEN_SHIFT;
81 return RSTRUCT_EMBED_LEN(st);
84 return RSTRUCT(st)->as.heap.len;
89RSTRUCT_LENINT(
VALUE st)
94static inline const VALUE *
95RSTRUCT_CONST_PTR(
VALUE st)
97 const struct RStruct *p = RSTRUCT(st);
103 return p->as.heap.ptr;
114RSTRUCT_GET(
VALUE st,
long k)
116 return RSTRUCT_CONST_PTR(st)[k];
@ RUBY_FL_USHIFT
Number of bits in ruby_fl_type that are not open to users.
@ RUBY_FL_USER5
User-defined flag.
@ RUBY_FL_USER3
User-defined flag.
@ RUBY_FL_USER7
User-defined flag.
@ RUBY_FL_USER6
User-defined flag.
@ RUBY_FL_USER2
User-defined flag.
@ RUBY_FL_USER4
User-defined flag.
@ RUBY_FL_USER1
User-defined flag.
#define FL_TEST_RAW
Old name of RB_FL_TEST_RAW.
#define RB_OBJ_WRITE(old, slot, young)
Declaration of a "back" pointer.
int len
Length of the buffer.
#define rb_long2int
Just another name of rb_long2int_inline.
Ruby object's base components.
uintptr_t VALUE
Type that represents a Ruby object.