Skip to content

Commit cc48fcd

Browse files
committed
Get rid of rb_shape_canonical_p
1 parent 8b0868c commit cc48fcd

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

shape.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,10 @@ rb_obj_shape(VALUE obj)
150150
return RSHAPE(rb_obj_shape_id(obj));
151151
}
152152

153-
static inline bool
154-
rb_shape_canonical_p(rb_shape_t *shape)
155-
{
156-
return !shape->flags;
157-
}
158-
159153
static inline bool
160154
rb_shape_id_canonical_p(shape_id_t shape_id)
161155
{
162-
return rb_shape_canonical_p(RSHAPE(shape_id));
156+
return !RSHAPE(shape_id)->flags;
163157
}
164158

165159
static inline shape_id_t

variable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1663,7 +1663,7 @@ rb_obj_init_too_complex(VALUE obj, st_table *table)
16631663
{
16641664
// This method is meant to be called on newly allocated object.
16651665
RUBY_ASSERT(!rb_shape_obj_too_complex_p(obj));
1666-
RUBY_ASSERT(rb_shape_canonical_p(rb_obj_shape(obj)));
1666+
RUBY_ASSERT(rb_shape_id_canonical_p(RBASIC_SHAPE_ID(obj)));
16671667
RUBY_ASSERT(rb_obj_shape(obj)->next_field_index == 0);
16681668

16691669
obj_transition_too_complex(obj, table);

0 commit comments

Comments
 (0)