From 2a4c4f7b0c147585119036c43c1d04f73621e510 Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 29 Aug 2007 23:12:21 +0000 Subject: * 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 --- ext/syck/rubyext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/syck') diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c index 9a41c18e8f..53625c91de 100644 --- a/ext/syck/rubyext.c +++ b/ext/syck/rubyext.c @@ -621,7 +621,7 @@ rb_syck_load_handler(SyckParser *p, SyckNode *n) if ( bonus->taint) OBJ_TAINT( obj ); if ( bonus->proc != 0 ) rb_funcall(bonus->proc, s_call, 1, obj); - rb_hash_aset(bonus->data, INT2FIX(RHASH(bonus->data)->tbl->num_entries), obj); + rb_hash_aset(bonus->data, INT2FIX(RHASH_SIZE(bonus->data)), obj); return obj; } -- cgit v1.2.3