diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-21 03:38:17 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-21 03:38:17 +0000 |
| commit | 60f846bb47967c3aab5828a3bc3a200e39428eae (patch) | |
| tree | 4d4ef529e739c5568447882837dcab5e05974be5 | |
| parent | 92bade722b1cd2b731302dca51d020a1f2b4e313 (diff) | |
| download | ruby-60f846bb47967c3aab5828a3bc3a200e39428eae.tar.gz ruby-60f846bb47967c3aab5828a3bc3a200e39428eae.tar.xz ruby-60f846bb47967c3aab5828a3bc3a200e39428eae.zip | |
* variable.c (rb_generic_ivar_memsize): should not remove generic
instance variable table.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | variable.c | 10 | ||||
| -rw-r--r-- | version.h | 4 |
3 files changed, 12 insertions, 7 deletions
@@ -1,3 +1,8 @@ +Tue Jul 21 12:38:07 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * variable.c (rb_generic_ivar_memsize): should not remove generic + instance variable table. + Mon Jul 20 20:35:55 2009 NARUSE, Yui <naruse@ruby-lang.org> * io.c (rb_f_open): add rdoc about specifying ext_enc as *-bom. diff --git a/variable.c b/variable.c index 1d8e4133c..3bab27874 100644 --- a/variable.c +++ b/variable.c @@ -908,10 +908,10 @@ rb_mark_generic_ivar_tbl(void) void rb_free_generic_ivar(VALUE obj) { - st_data_t tbl; + st_data_t key = (st_data_t)obj, tbl; if (!generic_iv_tbl) return; - if (st_delete(generic_iv_tbl, &obj, &tbl)) + if (st_delete(generic_iv_tbl, &key, &tbl)) st_free_table((st_table *)tbl); } @@ -919,8 +919,8 @@ size_t rb_generic_ivar_memsize(VALUE obj) { st_data_t tbl; - if (st_delete(generic_iv_tbl, &obj, &tbl)) - return st_memsize((st_table *)tbl); + if (st_lookup(generic_iv_tbl, (st_data_t)obj, &tbl)) + return st_memsize((st_table *)tbl); return 0; } @@ -931,7 +931,7 @@ rb_copy_generic_ivar(VALUE clone, VALUE obj) if (!generic_iv_tbl) return; if (!FL_TEST(obj, FL_EXIVAR)) { -clear: + clear: if (FL_TEST(clone, FL_EXIVAR)) { rb_free_generic_ivar(clone); FL_UNSET(clone, FL_EXIVAR); @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_RELEASE_DATE "2009-07-20" +#define RUBY_RELEASE_DATE "2009-07-21" #define RUBY_PATCHLEVEL -1 #define RUBY_BRANCH_NAME "trunk" @@ -8,7 +8,7 @@ #define RUBY_VERSION_TEENY 1 #define RUBY_RELEASE_YEAR 2009 #define RUBY_RELEASE_MONTH 7 -#define RUBY_RELEASE_DAY 20 +#define RUBY_RELEASE_DAY 21 #include "ruby/version.h" |
