зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
8b112c580c
Коммит
a3776588ef
|
@ -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.
|
||||
|
|
13
encoding.c
13
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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче