зеркало из https://github.com/github/ruby.git
* gc.c (rb_gc_call_finalizer_at_exit): use free() if dfree is -1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8f8a31b0e9
Коммит
100074c178
|
@ -1,3 +1,7 @@
|
|||
Sun Mar 23 19:54:53 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* gc.c (rb_gc_call_finalizer_at_exit): use free() if dfree is -1.
|
||||
|
||||
Sat Mar 22 15:50:29 2003 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* time.c (make_time_t): try search_time_t if mktime/timegm is failed.
|
||||
|
|
7
gc.c
7
gc.c
|
@ -1547,7 +1547,12 @@ rb_gc_call_finalizer_at_exit()
|
|||
if (BUILTIN_TYPE(p) == T_DATA &&
|
||||
DATA_PTR(p) && RANY(p)->as.data.dfree) {
|
||||
p->as.free.flags = 0;
|
||||
(*RANY(p)->as.data.dfree)(DATA_PTR(p));
|
||||
if ((long)RANY(p)->as.data.dfree == -1) {
|
||||
RUBY_CRITICAL(free(DATA_PTR(p)));
|
||||
}
|
||||
else if (RANY(p)->as.data.dfree) {
|
||||
(*RANY(p)->as.data.dfree)(DATA_PTR(p));
|
||||
}
|
||||
}
|
||||
else if (BUILTIN_TYPE(p) == T_FILE) {
|
||||
p->as.free.flags = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче