Skip to content

Commit 91dcce5

Browse files
committed
Change max_iv_count to type attr_index_t
max_iv_count is calculated from next_iv_index of the shape, which is of type attr_index_t, so we can also make max_iv_count of type attr_index_t.
1 parent ce99e50 commit 91dcce5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7349,7 +7349,7 @@ gc_mark_children(rb_objspace_t *objspace, VALUE obj)
73497349
VALUE klass = RBASIC_CLASS(obj);
73507350

73517351
// Increment max_iv_count if applicable, used to determine size pool allocation
7352-
uint32_t num_of_ivs = shape->next_iv_index;
7352+
attr_index_t num_of_ivs = shape->next_iv_index;
73537353
if (RCLASS_EXT(klass)->max_iv_count < num_of_ivs) {
73547354
RCLASS_EXT(klass)->max_iv_count = num_of_ivs;
73557355
}

internal/class.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ struct rb_classext_struct {
6565
#if !SHAPE_IN_BASIC_FLAGS
6666
shape_id_t shape_id;
6767
#endif
68-
uint32_t max_iv_count;
68+
attr_index_t max_iv_count;
6969
unsigned char variation_count;
7070
bool permanent_classpath;
7171
VALUE classpath;

0 commit comments

Comments
 (0)