aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-17 15:23:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-17 15:23:33 +0000
commita3776588ef0314ae6aaf68cab1ae4bf144b35883 (patch)
treecfdb60bb2a1c543bc206cd153a98cdc2ffce028e
parent8b112c580c854a5fb84b129aafff0e91022fcf6a (diff)
downloadruby-a3776588ef0314ae6aaf68cab1ae4bf144b35883.tar.gz
* encoding.c (enc_free): removed since rb_encoding may be used while
cleanup. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--encoding.c13
2 files changed, 6 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 297706eb66..a0162e9234 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jan 18 00:23:31 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * encoding.c (enc_free): removed since rb_encoding may be used while
+ cleanup.
+
Fri Jan 18 00:17:19 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* enc/euc_cn.c: split from enc/euc_kr.c.
diff --git a/encoding.c b/encoding.c
index 846b316945..1453b267b2 100644
--- a/encoding.c
+++ b/encoding.c
@@ -70,21 +70,10 @@ enc_mark(void *ptr)
{
}
-static void
-enc_free(void *ptr)
-{
- rb_encoding *enc = ptr;
- struct rb_encoding_entry *ent = &enc_table.list[enc->ruby_encoding_index];
- xfree((char *)ent->name);
- ent->name = 0;
- ent->enc = 0;
- xfree(ptr);
-}
-
static VALUE
enc_new(rb_encoding *encoding)
{
- VALUE enc = Data_Wrap_Struct(rb_cEncoding, enc_mark, enc_free, encoding);
+ VALUE enc = Data_Wrap_Struct(rb_cEncoding, enc_mark, -1, encoding);
encoding->auxiliary_data = (void *)enc;
return enc;
}