diff options
author | 卜部昌平 <[email protected]> | 2020-08-17 11:12:23 +0900 |
---|---|---|
committer | 卜部昌平 <[email protected]> | 2020-08-19 15:10:53 +0900 |
commit | 99093e1600ccef17ab99356b689573fcfd336ecc () | |
tree | b0654845b92b038889fff4eab6e1c73b6ba8a4c0 /struct.c | |
parent | d2eeb836344406eff3342b86436cc7eb0f8cc908 (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: Merged: https://.com/ruby/ruby/pull/3426
-rw-r--r-- | struct.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -388,9 +388,10 @@ struct_make_members_list(va_list ar) { char *mem; VALUE ary, list = rb_ident_hash_new(); - st_table *tbl = RHASH_TBL(list); RBASIC_CLEAR_CLASS(list); while ((mem = va_arg(ar, char*)) != 0) { VALUE sym = rb_sym_intern_ascii_cstr(mem); if (st_insert(tbl, sym, Qtrue)) { @@ -583,7 +584,8 @@ rb_struct_s_def(int argc, VALUE *argv, VALUE klass) rest = rb_ident_hash_new(); RBASIC_CLEAR_CLASS(rest); - tbl = RHASH_TBL(rest); for (i=0; i<argc; i++) { VALUE mem = rb_to_symbol(argv[i]); if (rb_is_attrset_sym(mem)) { |