From e1807e59951d4280895dd3f2c2fc4a774ad3fe6a Mon Sep 17 00:00:00 2001 From: kosaki Date: Fri, 15 Mar 2013 21:26:36 +0000 Subject: * thread_pthread.c (numberof): renamed from ARRAY_SIZE() because other all files use numberof(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread_pthread.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'thread_pthread.c') diff --git a/thread_pthread.c b/thread_pthread.c index 4187cf00db..bed9452a28 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -64,8 +64,8 @@ static pthread_t timer_thread_id; # define USE_SLEEPY_TIMER_THREAD 0 #endif -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#ifndef numberof +#define numberof(array) (int)(sizeof(array) / sizeof((array)[0])) #endif static void @@ -1327,7 +1327,7 @@ timer_thread_sleep(rb_global_vm_lock_t* gvl) } else { /* wait (infinite) */ - result = poll(pollfds, ARRAY_SIZE(pollfds), -1); + result = poll(pollfds, numberof(pollfds), -1); } if (result == 0) { -- cgit v1.2.3