diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-26 16:19:04 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-26 16:19:04 +0000 |
commit | c4c821a7d7f2229a7c8d2c36cdc6b20668101081 (patch) | |
tree | fa38a537cd03cadb33f41b83f2912373bdad876f /vm_insnhelper.c | |
parent | 9ae121d6df75c50bf114aaa3127715ad3194c047 (diff) | |
download | ruby-c4c821a7d7f2229a7c8d2c36cdc6b20668101081.tar.gz |
* hash.c (rb_hash_tbl_raw), internal.h: added.
Returns st_table without shading hash.
* array.c: use rb_hash_tbl_raw() for read-only purpose.
* compile.c (iseq_compile_each): ditto.
* gc.c (count_objects): ditto.
* insns.def: ditto.
* process.c: ditto.
* thread.c (clear_coverage): ditto.
* vm_insnhelper.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index bd3620a95f..88def22938 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1091,7 +1091,7 @@ extract_keywords(VALUE *orighash) *orighash = 0; return hash; } - st_foreach(RHASH_TBL(hash), separate_symbol, (st_data_t)&parthash); + st_foreach(rb_hash_tbl_raw(hash), separate_symbol, (st_data_t)&parthash); *orighash = parthash[1]; return parthash[0]; } @@ -1116,7 +1116,7 @@ vm_callee_setup_keyword_arg(const rb_iseq_t *iseq, int argc, VALUE *orig_argv, V VALUE missing = Qnil; for (; i < iseq->arg_keyword_required; i++) { VALUE keyword = ID2SYM(iseq->arg_keyword_table[i]); - if (st_lookup(RHASH_TBL(keyword_hash), (st_data_t)keyword, 0)) + if (st_lookup(rb_hash_tbl_raw(keyword_hash), (st_data_t)keyword, 0)) continue; if (NIL_P(missing)) missing = rb_ary_tmp_new(1); rb_ary_push(missing, keyword); @@ -1127,9 +1127,9 @@ vm_callee_setup_keyword_arg(const rb_iseq_t *iseq, int argc, VALUE *orig_argv, V } if (iseq->arg_keyword_check) { for (j = i; i < iseq->arg_keywords; i++) { - if (st_lookup(RHASH_TBL(keyword_hash), ID2SYM(iseq->arg_keyword_table[i]), 0)) j++; + if (st_lookup(rb_hash_tbl_raw(keyword_hash), ID2SYM(iseq->arg_keyword_table[i]), 0)) j++; } - if (RHASH_TBL(keyword_hash)->num_entries > (unsigned int) j) { + if (RHASH_SIZE(keyword_hash) > j) { unknown_keyword_error(iseq, keyword_hash); } } |