summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-29 23:12:21 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-29 23:12:21 +0000
commit2a4c4f7b0c147585119036c43c1d04f73621e510 (patch)
treea25d27ffdd53b0b5912e6746131b97a245a3732d /gc.c
parent3d7f8c2320d13fcc0c12e8910d70a812dab2f681 (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 'gc.c')
-rw-r--r--gc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gc.c b/gc.c
index 8054d9acb3..7d521eb07a 100644
--- a/gc.c
+++ b/gc.c
@@ -1032,7 +1032,7 @@ gc_mark_children(VALUE ptr, int lev)
break;
case T_HASH:
- mark_hash(obj->as.hash.tbl, lev);
+ mark_hash(obj->as.hash.ntbl, lev);
ptr = obj->as.hash.ifnone;
goto again;
@@ -1267,8 +1267,8 @@ obj_free(VALUE obj)
rb_ary_free(obj);
break;
case T_HASH:
- if (RANY(obj)->as.hash.tbl) {
- st_free_table(RANY(obj)->as.hash.tbl);
+ if (RANY(obj)->as.hash.ntbl) {
+ st_free_table(RANY(obj)->as.hash.ntbl);
}
break;
case T_REGEXP: