[前][次][番号順一覧][スレッド一覧]

ruby-changes:1821

From: ko1@a...
Date: 30 Aug 2007 08:38:52 +0900
Subject: [ruby-changes:1821] akr - Ruby:r13312 (trunk): forgot to modify

akr	2007-08-30 08:38:38 +0900 (Thu, 30 Aug 2007)

  New Revision: 13312

  Modified files:
    trunk/ChangeLog
    trunk/ext/json/ext/parser/parser.rl
    trunk/ext/tk/tkutil/tkutil.c

  Log:
    forgot to modify 
    ext/json/ext/parser/parser.rl and
    ext/tk/tkutil/tkutil.c.
    


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/tk/tkutil/tkutil.c?r1=13312&r2=13311
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13312&r2=13311
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/json/ext/parser/parser.rl?r1=13312&r2=13311

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 13311)
+++ ChangeLog	(revision 13312)
@@ -28,8 +28,12 @@
 
 	* 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@f...>
 
 	* lib/open-uri.rb: add :ftp_active_mode option.
Index: ext/json/ext/parser/parser.rl
===================================================================
--- ext/json/ext/parser/parser.rl	(revision 13311)
+++ ext/json/ext/parser/parser.rl	(revision 13312)
@@ -495,7 +495,7 @@
             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 @@
                 }
             }
             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;
             }
Index: ext/tk/tkutil/tkutil.c
===================================================================
--- ext/tk/tkutil/tkutil.c	(revision 13311)
+++ ext/tk/tkutil/tkutil.c	(revision 13312)
@@ -226,7 +226,7 @@
 
     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 @@
     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 @@
     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 @@
     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 @@
 
     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++;
         }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧]