diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-09-09 17:11:25 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-09-09 17:11:25 +0000 |
commit | 946f7fc7888f61da879c660b43e2c574aaf713eb (patch) | |
tree | 14f11e79ba5130e2f7152b4150e6ca28b103f366 | |
parent | 4c10b36467ba7cbb59128dabd437ef3931c7d0e4 (diff) |
* io.c (nogvl_close, maygvl_close, nogvl_fclose, maygvl_fclose):
suppress integer <-> pointer cast warnings.
[Feature #4570] [ruby-core:35711]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | io.c | 8 |
2 files changed, 10 insertions, 4 deletions
@@ -1,3 +1,9 @@ +Mon Sep 10 01:38:51 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com> + + * 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@gmail.com> * io.c (rb_io_close): notify fd close before releasing gvl. @@ -3858,7 +3858,7 @@ nogvl_close(void *ptr) { int *fd = ptr; - return (void*)close(*fd); + return (void*)(intptr_t)close(*fd); } static int @@ -3871,7 +3871,7 @@ maygvl_close(int fd, int keepgvl) * 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 @@ nogvl_fclose(void *ptr) { FILE *file = ptr; - return (void*)fclose(file); + return (void*)(intptr_t)fclose(file); } static int @@ -3888,7 +3888,7 @@ maygvl_fclose(FILE *file, int keepgvl) 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 |