@@ -686,16 +686,16 @@ rb_shape_transition_complex(VALUE obj)
686686 return rb_shape_id (shape_transition_too_complex (original_shape ));
687687}
688688
689- bool
690- rb_shape_has_object_id (rb_shape_t * shape )
689+ static inline bool
690+ shape_has_object_id (rb_shape_t * shape )
691691{
692692 return shape -> flags & SHAPE_FL_HAS_OBJECT_ID ;
693693}
694694
695695bool
696- rb_shape_id_has_object_id (shape_id_t shape_id )
696+ rb_shape_has_object_id (shape_id_t shape_id )
697697{
698- return rb_shape_has_object_id (RSHAPE (shape_id ));
698+ return shape_has_object_id (RSHAPE (shape_id ));
699699}
700700
701701shape_id_t
@@ -1081,7 +1081,7 @@ rb_shape_copy_complex_ivars(VALUE dest, VALUE obj, shape_id_t src_shape_id, st_t
10811081{
10821082 // obj is TOO_COMPLEX so we can copy its iv_hash
10831083 st_table * table = st_copy (fields_table );
1084- if (rb_shape_id_has_object_id (src_shape_id )) {
1084+ if (rb_shape_has_object_id (src_shape_id )) {
10851085 st_data_t id = (st_data_t )ruby_internal_object_id ;
10861086 st_delete (table , & id , NULL );
10871087 }
@@ -1155,11 +1155,11 @@ shape_frozen(VALUE self)
11551155}
11561156
11571157static VALUE
1158- shape_has_object_id (VALUE self )
1158+ shape_has_object_id_p (VALUE self )
11591159{
11601160 shape_id_t shape_id = NUM2INT (rb_struct_getmember (self , rb_intern ("id" )));
11611161 rb_shape_t * shape = RSHAPE (shape_id );
1162- return RBOOL (rb_shape_has_object_id (shape ));
1162+ return RBOOL (shape_has_object_id (shape ));
11631163}
11641164
11651165static VALUE
@@ -1467,7 +1467,7 @@ Init_shape(void)
14671467 rb_define_method (rb_cShape , "depth" , rb_shape_export_depth , 0 );
14681468 rb_define_method (rb_cShape , "too_complex?" , shape_too_complex , 0 );
14691469 rb_define_method (rb_cShape , "shape_frozen?" , shape_frozen , 0 );
1470- rb_define_method (rb_cShape , "has_object_id?" , shape_has_object_id , 0 );
1470+ rb_define_method (rb_cShape , "has_object_id?" , shape_has_object_id_p , 0 );
14711471
14721472 rb_define_const (rb_cShape , "SHAPE_ROOT" , INT2NUM (SHAPE_ROOT ));
14731473 rb_define_const (rb_cShape , "SHAPE_IVAR" , INT2NUM (SHAPE_IVAR ));
0 commit comments