summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authorgit <svn-admin@ruby-lang.org>2022-09-29 00:27:12 +0900
committergit <svn-admin@ruby-lang.org>2022-09-29 00:27:12 +0900
commit414f1066b174fbd35b73cedd0ef53d4bfa1254fd (patch)
tree75643ade688cf39570858af88021495cf09459ab /variable.c
parentd594a5a8bd0756f65c078fcf5ce0098250cba141 (diff)
* 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.
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c36
1 files changed, 18 insertions, 18 deletions
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;
}