summaryrefslogtreecommitdiff
path: root/encoding.c
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 /encoding.c
parent8b112c580c854a5fb84b129aafff0e91022fcf6a (diff)
* 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
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c13
1 files changed, 1 insertions, 12 deletions
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;
}