From 414f1066b174fbd35b73cedd0ef53d4bfa1254fd Mon Sep 17 00:00:00 2001 From: git Date: Thu, 29 Sep 2022 00:27:12 +0900 Subject: * expand tabs. [ci skip] Tabs were expanded because the file did not have any tab indentation in unedited lines. Please update your editor config, and use misc/expand_tabs.rb in the pre-commit hook. --- variable.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'variable.c') diff --git a/variable.c b/variable.c index a250bf5e20..b5e95b7f1c 100644 --- a/variable.c +++ b/variable.c @@ -1044,7 +1044,7 @@ rb_mark_generic_ivar(VALUE obj) struct gen_ivtbl *ivtbl; if (rb_gen_ivtbl_get(obj, 0, &ivtbl)) { - gen_ivtbl_mark(ivtbl); + gen_ivtbl_mark(ivtbl); } } @@ -1073,7 +1073,7 @@ rb_generic_ivar_memsize(VALUE obj) struct gen_ivtbl *ivtbl; if (rb_gen_ivtbl_get(obj, 0, &ivtbl)) - return gen_ivtbl_bytes(ivtbl->numiv); + return gen_ivtbl_bytes(ivtbl->numiv); return 0; } @@ -1766,17 +1766,17 @@ rb_ivar_count(VALUE obj) switch (BUILTIN_TYPE(obj)) { case T_OBJECT: - if (rb_shape_get_shape(obj)->iv_count > 0) { - st_index_t i, count, num = ROBJECT_NUMIV(obj); - const VALUE *const ivptr = ROBJECT_IVPTR(obj); - for (i = count = 0; i < num; ++i) { - if (ivptr[i] != Qundef) { - count++; - } - } - return count; - } - break; + if (rb_shape_get_shape(obj)->iv_count > 0) { + st_index_t i, count, num = ROBJECT_NUMIV(obj); + const VALUE *const ivptr = ROBJECT_IVPTR(obj); + for (i = count = 0; i < num; ++i) { + if (ivptr[i] != Qundef) { + count++; + } + } + return count; + } + break; case T_CLASS: case T_MODULE: if ((tbl = RCLASS_IV_TBL(obj)) != 0) { @@ -1787,11 +1787,11 @@ rb_ivar_count(VALUE obj) if (FL_TEST(obj, FL_EXIVAR)) { struct gen_ivtbl *ivtbl; - if (rb_gen_ivtbl_get(obj, 0, &ivtbl)) { - return gen_ivtbl_count(ivtbl); - } - } - break; + if (rb_gen_ivtbl_get(obj, 0, &ivtbl)) { + return gen_ivtbl_count(ivtbl); + } + } + break; } return 0; } -- cgit v1.2.3