diff options
author | Satoshi Tagomori <[email protected]> | 2025-05-08 23:38:00 +0900 |
---|---|---|
committer | Satoshi Tagomori <[email protected]> | 2025-05-11 23:32:50 +0900 |
commit | 294b52fb9b1c96479f6c1aba563ae7376419688a (patch) | |
tree | 37675ff6209aa6065ece00b2f0fb9f9a8bfafe2c /gc.c | |
parent | 90e5ce6132f874ed719bbb9fecd87ad2392ffbdd (diff) |
Follow the code style about else
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -2243,7 +2243,8 @@ rb_obj_memsize_of(VALUE obj) if (rb_shape_obj_too_complex_p(obj)) { rb_class_classext_foreach(obj, classext_fields_hash_memsize, (void *)&size); - } else { + } + else { // class IV sizes are allocated as powers of two size += SIZEOF_VALUE << bit_length(RCLASS_FIELDS_COUNT(obj)); } @@ -3746,7 +3747,8 @@ update_classext(rb_classext_t *ext, bool is_prime, VALUE namespace, void *arg) if (args->obj_too_complex) { gc_ref_update_table_values_only((st_table *)RCLASSEXT_FIELDS(ext)); - } else { + } + else { // Classext is not copied in this case for (attr_index_t i = 0; i < RCLASS_FIELDS_COUNT(klass); i++) { UPDATE_IF_MOVED(objspace, RCLASSEXT_FIELDS(RCLASS_EXT_PRIME(klass))[i]); |