summaryrefslogtreecommitdiff
path: root/ext/tk/tkutil
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-29 23:38:38 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-29 23:38:38 +0000
commit1591776d465bb901d0be1f45d03a65e2691ede50 (patch)
treeafa878304ccb774b759e861f980dfbcc759a318c /ext/tk/tkutil
parenteee95e67b9794c3c4d3a583b413377c12bcb565d (diff)
forgot to modify
ext/json/ext/parser/parser.rl and ext/tk/tkutil/tkutil.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/tkutil')
-rw-r--r--ext/tk/tkutil/tkutil.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c
index 25c4af742d..d74f996935 100644
--- a/ext/tk/tkutil/tkutil.c
+++ b/ext/tk/tkutil/tkutil.c
@@ -226,7 +226,7 @@ tk_symbolkey2str(self, keys)
if NIL_P(keys) return new_keys;
keys = rb_convert_type(keys, T_HASH, "Hash", "to_hash");
- st_foreach(RHASH(keys)->tbl, to_strkey, new_keys);
+ st_foreach(RHASH_TBL(keys), to_strkey, new_keys);
return new_keys;
}
@@ -270,7 +270,7 @@ ary2list(ary, enc_flag, self)
size = 0;
for(idx = 0; idx < RARRAY_LEN(ary); idx++) {
if (TYPE(RARRAY_PTR(ary)[idx]) == T_HASH) {
- size += 2 * RHASH(RARRAY_PTR(ary)[idx])->tbl->num_entries;
+ size += 2 * RHASH_SIZE(RARRAY_PTR(ary)[idx]);
} else {
size++;
}
@@ -617,10 +617,10 @@ hash2kv(hash, ary, self)
VALUE ary;
VALUE self;
{
- volatile VALUE dst = rb_ary_new2(2 * RHASH(hash)->tbl->num_entries);
+ volatile VALUE dst = rb_ary_new2(2 * RHASH_SIZE(hash));
volatile VALUE args = rb_ary_new3(2, dst, self);
- st_foreach(RHASH(hash)->tbl, push_kv, args);
+ st_foreach(RHASH_TBL(hash), push_kv, args);
if (NIL_P(ary)) {
return dst;
@@ -662,10 +662,10 @@ hash2kv_enc(hash, ary, self)
VALUE ary;
VALUE self;
{
- volatile VALUE dst = rb_ary_new2(2 * RHASH(hash)->tbl->num_entries);
+ volatile VALUE dst = rb_ary_new2(2 * RHASH_SIZE(hash));
volatile VALUE args = rb_ary_new3(2, dst, self);
- st_foreach(RHASH(hash)->tbl, push_kv_enc, args);
+ st_foreach(RHASH_TBL(hash), push_kv_enc, args);
if (NIL_P(ary)) {
return dst;
@@ -892,7 +892,7 @@ tk_conv_args(argc, argv, self)
for(size = 0, idx = 2; idx < argc; idx++) {
if (TYPE(argv[idx]) == T_HASH) {
- size += 2 * RHASH(argv[idx])->tbl->num_entries;
+ size += 2 * RHASH_SIZE(argv[idx]);
} else {
size++;
}