ruby-changes:11727
From: nobu <ko1@a...>
Date: Sat, 9 May 2009 12:25:26 +0900 (JST)
Subject: [ruby-changes:11727] Ruby:r23373 (trunk): * thread.c: fixed types.
nobu 2009-05-09 12:25:16 +0900 (Sat, 09 May 2009) New Revision: 23373 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23373 Log: * thread.c: fixed types. Modified files: trunk/thread.c Index: thread.c =================================================================== --- thread.c (revision 23372) +++ thread.c (revision 23373) @@ -391,7 +391,7 @@ th->local_lfp = proc->block.lfp; th->local_svar = Qnil; th->value = rb_vm_invoke_proc(th, proc, proc->block.self, - RARRAY_LEN(args), RARRAY_PTR(args), 0); + (int)RARRAY_LEN(args), RARRAY_PTR(args), 0); } else { th->value = (*th->first_func)((void *)th->first_args); @@ -750,7 +750,7 @@ time.tv_sec = (int)d; time.tv_usec = (int)((d - (int)d) * 1e6); if (time.tv_usec < 0) { - time.tv_usec += (long)1e6; + time.tv_usec += (int)1e6; time.tv_sec -= 1; } return time; @@ -2177,8 +2177,8 @@ static void rb_fd_resize(int n, rb_fdset_t *fds) { - int m = howmany(n + 1, NFDBITS) * sizeof(fd_mask); - int o = howmany(fds->maxfd, NFDBITS) * sizeof(fd_mask); + size_t m = howmany(n + 1, NFDBITS) * sizeof(fd_mask); + size_t o = howmany(fds->maxfd, NFDBITS) * sizeof(fd_mask); if (m < sizeof(fd_set)) m = sizeof(fd_set); if (o < sizeof(fd_set)) o = sizeof(fd_set); @@ -2214,7 +2214,7 @@ void rb_fd_copy(rb_fdset_t *dst, const fd_set *src, int max) { - int size = howmany(max, NFDBITS) * sizeof(fd_mask); + size_t size = howmany(max, NFDBITS) * sizeof(fd_mask); if (size < sizeof(fd_set)) size = sizeof(fd_set); dst->maxfd = max; @@ -2414,7 +2414,7 @@ double d = limit - timeofday(); wait_rest.tv_sec = (unsigned int)d; - wait_rest.tv_usec = (long)((d-(double)wait_rest.tv_sec)*1e6); + wait_rest.tv_usec = (int)((d-(double)wait_rest.tv_sec)*1e6); if (wait_rest.tv_sec < 0) wait_rest.tv_sec = 0; if (wait_rest.tv_usec < 0) wait_rest.tv_usec = 0; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/