Avoid accessing obj.tt of mrb_value; #5040

The old code compiles only on `MRB_NO_BOXING`.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-07-19 22:41:09 +09:00
parent 07b75d927e
commit a6f31ad6ce
@@ -210,7 +210,7 @@ os_memsize_of_object(mrb_state* mrb, mrb_value obj)
{
mrb_int size = 0;
switch(obj.tt) {
switch(mrb_type(obj)) {
case MRB_TT_STRING:
size += mrb_objspace_page_slot_size();
if (!RSTR_EMBED_P(RSTRING(obj)) && !RSTR_SHARED_P(RSTRING(obj))) {