Skip to content

Commit bbea71f

Browse files
committed
variable.c: Fix too_complex shape initialization
`SHAPE_OBJ_TOO_COMPLEX` is a `shape_type` not a `shape_id_t`.
1 parent 53ae558 commit bbea71f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

variable.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1709,7 +1709,7 @@ generic_ivar_set_too_complex_table(VALUE obj, void *data)
17091709
if (!rb_gen_ivtbl_get(obj, 0, &ivtbl)) {
17101710
ivtbl = xmalloc(sizeof(struct gen_ivtbl));
17111711
#if !SHAPE_IN_BASIC_FLAGS
1712-
ivtbl->shape_id = SHAPE_OBJ_TOO_COMPLEX;
1712+
ivtbl->shape_id = OBJ_TOO_COMPLEX_SHAPE_ID;
17131713
#endif
17141714
ivtbl->as.complex.table = st_init_numtable_with_size(1);
17151715

@@ -2117,7 +2117,7 @@ rb_copy_generic_ivar(VALUE clone, VALUE obj)
21172117
if (rb_shape_obj_too_complex(obj)) {
21182118
new_ivtbl = xmalloc(sizeof(struct gen_ivtbl));
21192119
#if !SHAPE_IN_BASIC_FLAGS
2120-
new_ivtbl->shape_id = SHAPE_OBJ_TOO_COMPLEX;
2120+
new_ivtbl->shape_id = OBJ_TOO_COMPLEX_SHAPE_ID;
21212121
#endif
21222122
new_ivtbl->as.complex.table = st_copy(obj_ivtbl->as.complex.table);
21232123
}

0 commit comments

Comments
 (0)