summaryrefslogtreecommitdiff
path: root/ext/objspace
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-08-17 11:12:23 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-08-19 15:10:53 +0900
commit99093e1600ccef17ab99356b689573fcfd336ecc (patch)
treeb0654845b92b038889fff4eab6e1c73b6ba8a4c0 /ext/objspace
parentd2eeb836344406eff3342b86436cc7eb0f8cc908 (diff)
RHASH_TBL: is now ext-only
It seems almost no internal codes use RHASH_TBL any longer. Why not just eliminate it entirely, so that the macro can be purely ext-only.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3426
Diffstat (limited to 'ext/objspace')
-rw-r--r--ext/objspace/objspace.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c
index a9b1e64183..262640d30c 100644
--- a/ext/objspace/objspace.c
+++ b/ext/objspace/objspace.c
@@ -141,7 +141,8 @@ setup_hash(int argc, VALUE *argv)
hash = rb_hash_new();
}
else if (!RHASH_EMPTY_P(hash)) {
- st_foreach(RHASH_TBL(hash), set_zero_i, hash);
+ /* WB: no new reference */
+ st_foreach(RHASH_TBL_RAW(hash), set_zero_i, hash);
}
return hash;