ruby-changes:17455
From: nobu <ko1@a...>
Date: Tue, 12 Oct 2010 23:12:27 +0900 (JST)
Subject: [ruby-changes:17455] Ruby:r29460 (trunk): * gc.c (obj_free, rb_objspace_call_finalizer): fix truncating
nobu 2010-10-12 23:09:27 +0900 (Tue, 12 Oct 2010) New Revision: 29460 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29460 Log: * gc.c (obj_free, rb_objspace_call_finalizer): fix truncating cast. Modified files: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 29459) +++ ChangeLog (revision 29460) @@ -1,5 +1,8 @@ -Tue Oct 12 23:03:20 2010 Nobuyoshi Nakada <nobu@r...> +Tue Oct 12 23:09:24 2010 Nobuyoshi Nakada <nobu@r...> + * gc.c (obj_free, rb_objspace_call_finalizer): fix truncating + cast. + * gc.c (mark_current_machine_context): suppress warnings. * compile.c (iseq_compile_each): fix truncating cast. Index: gc.c =================================================================== --- gc.c (revision 29459) +++ gc.c (revision 29460) @@ -2190,7 +2190,7 @@ 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 @@ 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) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/