Skip to content

Commit 326c120

Browse files
committed
Rename rb_shape_id_canonical_p -> rb_shape_canonical_p
1 parent 6c4ae85 commit 326c120

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

object.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ rb_obj_copy_ivar(VALUE dest, VALUE obj)
339339
shape_id_t dest_shape_id = src_shape_id;
340340
shape_id_t initial_shape_id = RBASIC_SHAPE_ID(dest);
341341

342-
if (RSHAPE(initial_shape_id)->heap_index != RSHAPE(src_shape_id)->heap_index || !rb_shape_id_canonical_p(src_shape_id)) {
342+
if (RSHAPE(initial_shape_id)->heap_index != RSHAPE(src_shape_id)->heap_index || !rb_shape_canonical_p(src_shape_id)) {
343343
RUBY_ASSERT(RSHAPE(initial_shape_id)->type == SHAPE_T_OBJECT);
344344

345345
dest_shape_id = rb_shape_rebuild(initial_shape_id, src_shape_id);

shape.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void rb_shape_copy_fields(VALUE dest, VALUE *dest_buf, shape_id_t dest_shape_id,
142142
void rb_shape_copy_complex_ivars(VALUE dest, VALUE obj, shape_id_t src_shape_id, st_table *fields_table);
143143

144144
static inline bool
145-
rb_shape_id_canonical_p(shape_id_t shape_id)
145+
rb_shape_canonical_p(shape_id_t shape_id)
146146
{
147147
return !RSHAPE(shape_id)->flags;
148148
}

variable.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,7 @@ rb_obj_init_too_complex(VALUE obj, st_table *table)
16591659
{
16601660
// This method is meant to be called on newly allocated object.
16611661
RUBY_ASSERT(!rb_shape_obj_too_complex_p(obj));
1662-
RUBY_ASSERT(rb_shape_id_canonical_p(RBASIC_SHAPE_ID(obj)));
1662+
RUBY_ASSERT(rb_shape_canonical_p(RBASIC_SHAPE_ID(obj)));
16631663
RUBY_ASSERT(RSHAPE_LEN(RBASIC_SHAPE_ID(obj)) == 0);
16641664

16651665
obj_transition_too_complex(obj, table);
@@ -2340,7 +2340,7 @@ rb_copy_generic_ivar(VALUE dest, VALUE obj)
23402340
shape_id_t dest_shape_id = src_shape_id;
23412341
shape_id_t initial_shape_id = rb_obj_shape_id(dest);
23422342

2343-
if (!rb_shape_id_canonical_p(src_shape_id)) {
2343+
if (!rb_shape_canonical_p(src_shape_id)) {
23442344
RUBY_ASSERT(RSHAPE(initial_shape_id)->type == SHAPE_ROOT);
23452345

23462346
dest_shape_id = rb_shape_rebuild(initial_shape_id, src_shape_id);

0 commit comments

Comments
 (0)