summaryrefslogtreecommitdiff
path: root/shape.h
diff options
context:
space:
mode:
-rw-r--r--shape.h38
1 files changed, 31 insertions, 7 deletions
@@ -143,12 +143,6 @@ shape_id_t rb_shape_rebuild(shape_id_t initial_shape_id, shape_id_t dest_shape_i
void rb_shape_copy_fields(VALUE dest, VALUE *dest_buf, shape_id_t dest_shape_id, VALUE src, VALUE *src_buf, shape_id_t src_shape_id);
void rb_shape_copy_complex_ivars(VALUE dest, VALUE obj, shape_id_t src_shape_id, st_table *fields_table);
-static inline rb_shape_t *
-rb_obj_shape(VALUE obj)
-{
- return RSHAPE(rb_obj_shape_id(obj));
-}
-
static inline bool
rb_shape_id_canonical_p(shape_id_t shape_id)
{
@@ -161,6 +155,36 @@ rb_shape_root(size_t heap_id)
return (shape_id_t)(heap_id + FIRST_T_OBJECT_SHAPE_ID);
}
static inline uint32_t
ROBJECT_FIELDS_CAPACITY(VALUE obj)
{
@@ -213,7 +237,7 @@ bool rb_shape_set_shape_id(VALUE obj, shape_id_t shape_id);
static inline bool
rb_shape_obj_has_id(VALUE obj)
{
- return rb_shape_has_object_id(rb_obj_shape(obj));
}
// For ext/objspace