diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-29 23:12:21 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-29 23:12:21 +0000 |
commit | 2a4c4f7b0c147585119036c43c1d04f73621e510 (patch) | |
tree | a25d27ffdd53b0b5912e6746131b97a245a3732d /ext/iconv | |
parent | 3d7f8c2320d13fcc0c12e8910d70a812dab2f681 (diff) |
* include/ruby/intern.h: declare rb_hash_tbl.
* include/ruby/ruby.h (RHash): delay st_table allocation.
rename tbl field to ntbl to detect direct reference to the st_table
as a compile error.
(RHASH_TBL): abstract accessor defined.
(RHASH_ITER_LEV): ditto.
(RHASH_IFNONE): ditto.
(RHASH_SIZE): ditto.
(RHASH_EMPTY_P): ditto.
* hash.c: delay st_table allocation.
* gc.c: replace tbl by ntbl.
* array.c: replace direct field accessor by abstract field accessor
such as RHASH(hash)->tbl to RHASH_TBL(hash).
* marshal.c: ditto.
* insns.def: ditto.
* ext/iconv/iconv.c: ditto.
* ext/json/ext/generator/generator.c: ditto.
* ext/json/ext/parser/parser.c: ditto.
* ext/syck/rubyext.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/iconv')
-rw-r--r-- | ext/iconv/iconv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index b6bc0a11a5..ccedd0c66d 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -138,10 +138,10 @@ map_charset(VALUE *code) { VALUE val = *code; - if (RHASH(charset_map)->tbl && RHASH(charset_map)->tbl->num_entries) { + if (RHASH_SIZE(charset_map)) { VALUE key = rb_funcall2(val, rb_intern("downcase"), 0, 0); StringValuePtr(key); - if (st_lookup(RHASH(charset_map)->tbl, key, &val)) { + if (st_lookup(RHASH_TBL(charset_map), key, &val)) { *code = val; } } |