1#ifndef INTERNAL_OBJECT_H
2#define INTERNAL_OBJECT_H
16VALUE rb_class_allocate_instance_capa(
VALUE klass, uint8_t max_iv_count);
18NORETURN(
void rb_undefined_alloc(
VALUE klass));
19double rb_num_to_dbl(
VALUE val);
24VALUE rb_check_convert_type_with_id_slow(
VALUE,
int,
const char*,
ID);
25int rb_bool_expected(
VALUE,
const char *,
int raise);
28rb_check_convert_type_with_id(
VALUE val,
int type,
const char *tname,
ID method)
31 return rb_check_convert_type_with_id_slow(val,
type, tname, method);
33static inline void RBASIC_CLEAR_CLASS(
VALUE obj);
34static inline void RBASIC_SET_CLASS_RAW(
VALUE obj,
VALUE klass);
35static inline void RBASIC_SET_CLASS(
VALUE obj,
VALUE klass);
37RUBY_SYMBOL_EXPORT_BEGIN
39int rb_opts_exception_p(
VALUE opts,
int default_value);
47VALUE rb_convert_type_with_id(
VALUE v,
int t,
const char* nam,
ID mid);
55 *(
VALUE *)ptr = klass;
59RBASIC_CLEAR_CLASS(
VALUE obj)
61 RBASIC_SET_CLASS_RAW(obj, 0);
68 RBASIC_SET_CLASS_RAW(obj, klass);
73ROBJECT_SET_EXTENDED(
VALUE obj,
VALUE fields_obj)
81rb_obj_embedded_size(uint32_t fields_count)
83 size_t size = offsetof(
struct RObject, as.ary) + (
sizeof(
VALUE) * fields_count);
#define RUBY_ASSERT(...)
Asserts that the given expression is truthy if and only if RUBY_DEBUG is truthy.
#define T_IMEMO
Old name of RUBY_T_IMEMO.
#define T_DATA
Old name of RUBY_T_DATA.
#define T_OBJECT
Old name of RUBY_T_OBJECT.
#define RB_OBJ_WRITTEN(old, oldv, young)
Identical to RB_OBJ_WRITE(), except it doesn't write any values, but only a WB declaration.
#define RB_OBJ_WRITE(old, slot, young)
Declaration of a "back" pointer.
VALUE type(ANYARGS)
ANYARGS-ed function type.
static VALUE RBASIC_CLASS(VALUE obj)
Queries the class of an object.
#define RBASIC(obj)
Convenient casting macro.
#define ROBJECT(obj)
Convenient casting macro.
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
uintptr_t VALUE
Type that represents a Ruby object.
static bool RB_TYPE_P(VALUE obj, enum ruby_value_type t)
Queries if the given object is of given type.