1 #ifndef INTERNAL_OBJECT_H
2 #define INTERNAL_OBJECT_H
12 #include "internal/class.h"
14 #ifdef ROBJECT_IV_INDEX_TBL
15 # undef ROBJECT_IV_INDEX_TBL
20 NORETURN(
void rb_undefined_alloc(
VALUE klass));
21 double rb_num_to_dbl(
VALUE val);
24 VALUE rb_check_convert_type_with_id(
VALUE,
int,
const char*,
ID);
25 int rb_bool_expected(
VALUE,
const char *);
26 static inline void RBASIC_CLEAR_CLASS(
VALUE obj);
27 static inline void RBASIC_SET_CLASS_RAW(
VALUE obj,
VALUE klass);
28 static inline void RBASIC_SET_CLASS(
VALUE obj,
VALUE klass);
29 static inline struct st_table *ROBJECT_IV_INDEX_TBL_inline(
VALUE obj);
31 RUBY_SYMBOL_EXPORT_BEGIN
33 int rb_opts_exception_p(
VALUE opts,
int default_value);
34 RUBY_SYMBOL_EXPORT_END
36 MJIT_SYMBOL_EXPORT_BEGIN
42 VALUE rb_convert_type_with_id(
VALUE v,
int t,
const char* nam,
ID mid);
44 VALUE rb_get_freeze_opt(
int argc,
VALUE *argv);
45 MJIT_SYMBOL_EXPORT_END
51 *(
VALUE *)ptr = klass;
55 RBASIC_CLEAR_CLASS(
VALUE obj)
57 RBASIC_SET_CLASS_RAW(obj, 0);
64 RBASIC_SET_CLASS_RAW(obj, klass);
70 ROBJECT_IV_INDEX_TBL_inline(
VALUE obj)
74 return RCLASS_IV_INDEX_TBL(klass);
78 return ptr->as.heap.iv_index_tbl;
81 #define ROBJECT_IV_INDEX_TBL ROBJECT_IV_INDEX_TBL_inline
static bool RB_FL_ANY_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_ANY().
VALUE rb_obj_class(VALUE obj)
Queries the class of an object.
VALUE rb_class_search_ancestor(VALUE klass, VALUE super)
Internal header for 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.
RBIMPL_ATTR_PURE() int rb_io_read_pending(rb_io_t *fptr)
Queries if the passed IO has any pending reads.
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.