ruby-changes:24891
From: kosaki <ko1@a...>
Date: Mon, 10 Sep 2012 02:12:44 +0900 (JST)
Subject: [ruby-changes:24891] kosaki:r36943 (trunk): * io.c (nogvl_close, maygvl_close, nogvl_fclose, maygvl_fclose):
kosaki 2012-09-10 02:11:25 +0900 (Mon, 10 Sep 2012) New Revision: 36943 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36943 Log: * io.c (nogvl_close, maygvl_close, nogvl_fclose, maygvl_fclose): suppress integer <-> pointer cast warnings. [Feature #4570] [ruby-core:35711] Modified files: trunk/ChangeLog trunk/io.c Index: ChangeLog =================================================================== --- ChangeLog (revision 36942) +++ ChangeLog (revision 36943) @@ -1,3 +1,9 @@ +Mon Sep 10 01:38:51 2012 KOSAKI Motohiro <kosaki.motohiro@g...> + + * io.c (nogvl_close, maygvl_close, nogvl_fclose, maygvl_fclose): + suppress integer <-> pointer cast warnings. + [Feature #4570] [ruby-core:35711] + Mon Sep 10 01:36:00 2012 KOSAKI Motohiro <kosaki.motohiro@g...> * io.c (rb_io_close): notify fd close before releasing gvl. Index: io.c =================================================================== --- io.c (revision 36942) +++ io.c (revision 36943) @@ -3858,7 +3858,7 @@ { int *fd = ptr; - return (void*)close(*fd); + return (void*)(intptr_t)close(*fd); } static int @@ -3871,7 +3871,7 @@ * close() may block for certain file types (NFS, SO_LINGER sockets, * inotify), so let other threads run. */ - return (int)rb_thread_call_without_gvl(nogvl_close, &fd, RUBY_UBF_IO, 0); + return (int)(intptr_t)rb_thread_call_without_gvl(nogvl_close, &fd, RUBY_UBF_IO, 0); } static void* @@ -3879,7 +3879,7 @@ { FILE *file = ptr; - return (void*)fclose(file); + return (void*)(intptr_t)fclose(file); } static int @@ -3888,7 +3888,7 @@ if (keepgvl) return fclose(file); - return (int)rb_thread_call_without_gvl(nogvl_fclose, file, RUBY_UBF_IO, 0); + return (int)(intptr_t)rb_thread_call_without_gvl(nogvl_fclose, file, RUBY_UBF_IO, 0); } static void -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/