зеркало из https://github.com/github/ruby.git
* gc.c (obj_free, rb_objspace_call_finalizer): fix truncating
cast. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
0172f3181f
Коммит
3c24bea4b5
|
@ -1,4 +1,7 @@
|
|||
Tue Oct 12 23:03:20 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Tue Oct 12 23:09:24 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* gc.c (obj_free, rb_objspace_call_finalizer): fix truncating
|
||||
cast.
|
||||
|
||||
* gc.c (mark_current_machine_context): suppress warnings.
|
||||
|
||||
|
|
4
gc.c
4
gc.c
|
@ -2190,7 +2190,7 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
|
|||
if (RTYPEDDATA_P(obj)) {
|
||||
RDATA(obj)->dfree = RANY(obj)->as.typeddata.type->function.dfree;
|
||||
}
|
||||
if ((long)RANY(obj)->as.data.dfree == -1) {
|
||||
if (RANY(obj)->as.data.dfree == (RUBY_DATA_FUNC)-1) {
|
||||
xfree(DATA_PTR(obj));
|
||||
}
|
||||
else if (RANY(obj)->as.data.dfree) {
|
||||
|
@ -2908,7 +2908,7 @@ rb_objspace_call_finalizer(rb_objspace_t *objspace)
|
|||
if (RTYPEDDATA_P(p)) {
|
||||
RDATA(p)->dfree = RANY(p)->as.typeddata.type->function.dfree;
|
||||
}
|
||||
if ((long)RANY(p)->as.data.dfree == -1) {
|
||||
if (RANY(p)->as.data.dfree == (RUBY_DATA_FUNC)-1) {
|
||||
xfree(DATA_PTR(p));
|
||||
}
|
||||
else if (RANY(p)->as.data.dfree) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче