@@ -1842,6 +1842,10 @@ object_id(VALUE obj)
18421842
18431843 id = ULL2NUM (next_object_id );
18441844 next_object_id += OBJ_ID_INCREMENT ;
1845+
1846+ if (RB_TYPE_P (obj , T_DATA )) {
1847+ fprintf (stderr , "generated object_id=%llu (%s)\n" , NUM2ULL (id ), RSTRING_PTR (rb_class_name (CLASS_OF (obj ))));
1848+ }
18451849 st_insert (table , (st_data_t )internal_object_id , (st_data_t )id );
18461850 }
18471851 else if (rb_shape_has_object_id (shape )) {
@@ -1852,6 +1856,10 @@ object_id(VALUE obj)
18521856 id = ULL2NUM (next_object_id );
18531857 next_object_id += OBJ_ID_INCREMENT ;
18541858
1859+ if (RB_TYPE_P (obj , T_DATA )) {
1860+ fprintf (stderr , "generated object_id=%llu (%s)\n" , NUM2ULL (id ), RSTRING_PTR (rb_class_name (CLASS_OF (obj ))));
1861+ }
1862+
18551863 rb_shape_t * object_id_shape = rb_shape_object_id_shape (obj );
18561864 rb_obj_field_set (obj , object_id_shape , id );
18571865 if (RB_UNLIKELY (id_to_obj_tbl )) {
@@ -1914,7 +1922,7 @@ obj_free_object_id(VALUE obj)
19141922 GC_ASSERT (id );
19151923
19161924 if (!st_delete (id_to_obj_tbl , & id , NULL )) {
1917- rb_bug ("Object ID seen, but not in id_to_obj table: object_id=%" PRIsVALUE " object=%s" , ( VALUE )id , rb_obj_info (obj ));
1925+ rb_bug ("Object ID seen, but not in id_to_obj table: object_id=%llu object=%s" , NUM2ULL (( VALUE )id ) , rb_obj_info (obj ));
19181926 }
19191927 }
19201928 }
0 commit comments