Use ruby_sized_xfree

This commit is contained in:
Jean Boussier committed 2026-02-01 21:57:59 +01:00
1 parent a93604b5ed
commit 4e196af17c
5 files changed
+8 -21
Notes: git 2026-02-01 20:58:30 +00:00

No files matched your search

+1 -1
View File
@@ -1890,7 +1890,7 @@ rb_ensure_iv_list_size(VALUE obj, uint32_t current_len, uint32_t new_capacity)
RUBY_ASSERT(!rb_shape_obj_too_complex_p(obj));
if (FL_TEST_RAW(obj, ROBJECT_HEAP)) {
REALLOC_N(ROBJECT(obj)->as.heap.fields, VALUE, new_capacity);
SIZED_REALLOC_N(ROBJECT(obj)->as.heap.fields, VALUE, new_capacity, current_len);
}
else {
VALUE *ptr = ROBJECT_FIELDS(obj);