mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
Use ruby_sized_xfree
This commit is contained in:
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
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user