summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorJean Boussier <byroot@ruby-lang.org>2023-02-15 10:07:06 +0100
committerJean Boussier <jean.boussier@gmail.com>2023-02-15 10:47:22 +0100
commitbac4d2eefa079168968841079727fe2289b6ab6e (patch)
treec85e9256e91b61c35f5e02d9f4907e8fe94ff751 /gc.c
parent1f936d654ac49dff1a6d55aa079aaf1ebba24042 (diff)
Check !RCLASS_EXT_EMBEDDED instead of SIZE_POOL_COUNT == 1
It's much more self documenting and consistent
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7307
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index 451af7cc6f..42de20060b 100644
--- a/gc.c
+++ b/gc.c
@@ -3489,7 +3489,7 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
xfree(RCLASS_SUPERCLASSES(obj));
}
-#if SIZE_POOL_COUNT == 1
+#if !RCLASS_EXT_EMBEDDED
if (RCLASS_EXT(obj))
xfree(RCLASS_EXT(obj));
#endif
@@ -4908,7 +4908,7 @@ obj_memsize_of(VALUE obj, int use_all_types)
if (FL_TEST_RAW(obj, RCLASS_SUPERCLASSES_INCLUDE_SELF)) {
size += (RCLASS_SUPERCLASS_DEPTH(obj) + 1) * sizeof(VALUE);
}
-#if SIZE_POOL_COUNT == 1
+#if !RCLASS_EXT_EMBEDDED
size += sizeof(rb_classext_t);
#endif
}