1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
akr 2007-08-29 23:38:38 +00:00
parent eee95e67b9
commit 1591776d46
3 changed files with 13 additions and 9 deletions

View file

@ -28,8 +28,12 @@ Thu Aug 30 08:00:12 2007 Tanaka Akira <akr@fsij.org>
* ext/json/ext/parser/parser.c: ditto.
* ext/json/ext/parser/parser.rl: ditto.
* ext/syck/rubyext.c: ditto.
* ext/tk/tkutil/tkutil.c: ditto.
Wed Aug 29 18:36:06 2007 Tanaka Akira <akr@fsij.org>
* lib/open-uri.rb: add :ftp_active_mode option.

View file

@ -495,7 +495,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
rb_raise(rb_eArgError, "opts needs to be like a hash");
} else {
VALUE tmp = ID2SYM(i_max_nesting);
if (st_lookup(RHASH(opts)->tbl, tmp, 0)) {
if (st_lookup(RHASH_TBL(opts), tmp, 0)) {
VALUE max_nesting = rb_hash_aref(opts, tmp);
if (RTEST(max_nesting)) {
Check_Type(max_nesting, T_FIXNUM);
@ -505,7 +505,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
}
}
tmp = ID2SYM(i_allow_nan);
if (st_lookup(RHASH(opts)->tbl, tmp, 0)) {
if (st_lookup(RHASH_TBL(opts), tmp, 0)) {
VALUE allow_nan = rb_hash_aref(opts, tmp);
if (RTEST(allow_nan)) json->allow_nan = 1;
}

View file

@ -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++;
}